1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
36 # You can also set the following parser properties via test options:
37 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
38 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
41 # For testing purposes, temporary articles can created:
42 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
43 # where '/' denotes a newline.
45 # This is the standard article assumed to exist.
82 MediaWiki:bad image list
84 * [[File:Bad.jpg]] except [[Nasty page]]
112 Template:echo_with_span
118 Template:echo_with_div
131 Template:table_attribs
134 |</noinclude>style="color:red;"|Foo
138 Template:table_attribs_2
141 |</noinclude>style="color:red;"|Foo
146 Template:table_attribs_3
149 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
153 Template:table_attribs_4
155 | style="background-color:#DC241f;" width="10px" |
159 Template:table_attribs_5
162 |</noinclude>style="color:red;"||Bar
166 Template:table_attribs_6
168 style="background: <nowiki>
175 Template:table_attribs_7
178 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
182 Template:table_header_cells
184 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
190 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
194 Template:PartialTable
201 Template:image_attribs
204 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
207 ## See T48811 for details
209 Template:mixed_attr_content_template
211 style="color:red;" title="T48811"
217 Template:definition_list
264 Template:EmptyTRWithHTMLAttrTest
267 <tr align="center"></tr>
268 <tr><td>foo</td></tr>
269 <tr align="center"></tr>
270 <tr><td>bar</td></tr>
287 This is a simple paragraph.
289 <p>This is a simple paragraph.
294 Paragraphs with extra newline spacing
317 Paragraphs with newline spacing with comment lines in between
325 <!--foo--><!--More than 1 comment, still stripped-->
329 <!--foo--> <!----> <!-- bar -->
390 Paragraphs with newline spacing with non-empty white-space lines in between
417 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
425 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
464 Extra newlines: More paragraphs with indented comment
479 Extra newlines followed by heading
494 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
495 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
498 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
503 Extra newlines between heading and content are swallowed
511 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
512 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
519 http://fr.wikipedia.org/wiki/🍺
520 <!-- EasterEgg we love beer, better be able be able to link to it -->
522 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
526 # Note that the html+tidy output removes the spaces after the <li>,
527 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
528 # This is an issue for all tests with lists. We intentionally do
529 # *not* add html+tidy clauses for these, as we don't want to
530 # document/test the broken behavior. (Parsoid matches the non-tidy
531 # output in these cases.)
540 <li> Item 2</li></ul>
548 * plain''italic''plain
549 * plain''italic''plain''italic''plain
550 * plain'''bold'''plain
551 * plain'''bold'''plain'''bold'''plain
552 * plain''italic''plain'''bold'''plain
553 * plain'''bold'''plain''italic''plain
554 * plain''italic'''bold-italic'''italic''plain
555 * plain'''bold''bold-italic''bold'''plain
556 * plain'''''bold-italic'''italic''plain
557 * plain'''''bold-italic''bold'''plain
558 * plain''italic'''bold-italic'''''plain
559 * plain'''bold''bold-italic'''''plain
560 * plain l'''italic''plain
561 * plain l''''bold''' plain
564 <li> plain<i>italic</i>plain</li>
565 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
566 <li> plain<b>bold</b>plain</li>
567 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
568 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
569 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
570 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
571 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
572 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
573 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
574 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
575 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
576 <li> plain l'<i>italic</i>plain</li>
577 <li> plain l'<b>bold</b> plain</li></ul>
581 # this example taken from the [[simple:Moon]] article (bug 47326)
583 Italics and possessives (1)
585 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
587 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
591 # this example taken from [[en:Flaming Pie]] (bug 49926)
593 Italics and possessives (2)
595 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
597 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
601 # this example taken from [[en:Dictionary]] (bug 49926)
603 Italics and possessives (3)
605 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
607 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
613 ### 2-quote opening sequence tests
616 Italics and bold: 2-quote opening sequence: (2,2)
625 Italics and bold: 2-quote opening sequence: (2,3)
634 Italics and bold: 2-quote opening sequence: (2,4)
644 # same html as previous, but wikitext adjusted to match parsoid html2wt
646 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
648 ''foo<nowiki>''</nowiki>''
654 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
656 Italics and bold: 2-quote opening sequence: (2,5)
669 # same html as previous, but wikitext adjusted to match parsoid html2wt
671 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
673 ''foo'''''<nowiki/>'''
684 ### 3-quote opening sequence tests
688 Italics and bold: 3-quote opening sequence: (3,2)
697 Italics and bold: 3-quote opening sequence: (3,3)
706 Italics and bold: 3-quote opening sequence: (3,4)
714 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
716 Italics and bold: 3-quote opening sequence: (3,5)
729 # same html as previous, but wikitext adjusted to match parsoid html2wt
731 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
733 '''foo'''''<nowiki/>''
744 ### 4-quote opening sequence tests
748 Italics and bold: 4-quote opening sequence: (4,2)
758 # same html as previous, but wikitext adjusted to match parsoid html2wt
760 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
762 <nowiki>''</nowiki>''foo''
769 Italics and bold: 4-quote opening sequence: (4,3)
778 Italics and bold: 4-quote opening sequence: (4,4)
788 # same html as previous, but wikitext adjusted to match parsoid html2wt
790 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
798 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
800 Italics and bold: 4-quote opening sequence: (4,5)
809 <p>'<b>foo</b><i></i>
813 # same html as previous, but wikitext adjusted to match parsoid html2wt
815 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
817 '<nowiki/>'''foo'''''<nowiki/>''
822 <p>'<b>foo</b><i></i>
828 ### 5-quote opening sequence tests
832 Italics and bold: 5-quote opening sequence: (5,2)
842 # same html as previous, but wikitext adjusted to match parsoid html2wt
844 Italics and bold: 5-quote opening sequence: (5,2+3)
853 Italics and bold: 5-quote opening sequence: (5,3)
863 # same html as previous, but wikitext adjusted to match parsoid html2wt
865 Italics and bold: 5-quote opening sequence: (5,3+2)
874 Italics and bold: 5-quote opening sequence: (5,4)
880 <p><i><b>foo'</b></i>
885 Italics and bold: 5-quote opening sequence: (5,5)
894 Italics and bold: 5-quote opening sequence: (5,6)
898 <p><i><b>foo'</b></i>
903 ### multiple quote sequences in a line
906 Italics and bold: multiple quote sequences: (2,4,2)
912 <p><i>foo'<b>bar</b></i>
917 # same html as previous, but wikitext adjusted to match parsoid html2wt
919 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
921 ''foo'<nowiki/>'''bar'''''
923 <p><i>foo'<b>bar</b></i>
929 Italics and bold: multiple quote sequences: (2,4,3)
935 <p><i>foo'<b>bar</b></i>
940 # same html as previous, but wikitext adjusted to match parsoid html2wt
942 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
944 ''foo'<nowiki/>'''bar'''''
946 <p><i>foo'<b>bar</b></i>
952 Italics and bold: multiple quote sequences: (2,4,4)
958 <p><i>foo'<b>bar'</b></i>
963 # same html as previous, but wikitext adjusted to match parsoid html2wt
965 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
967 ''foo'<nowiki/>'''bar'<nowiki/>'''''
969 <p><i>foo'<b>bar'</b></i>
974 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
976 Italics and bold: multiple quote sequences: (3,4,2)
985 <p><b>foo'</b>bar<i></i>
989 # same html as previous, but wikitext adjusted to match parsoid html2wt
991 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
995 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
1000 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1005 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1007 Italics and bold: multiple quote sequences: (3,4,3)
1016 <p><b>foo'</b>bar<b></b>
1020 # same html as previous, but wikitext adjusted to match parsoid html2wt
1022 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1024 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1029 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1034 ### other quote tests
1037 Italics and bold: other quote tests: (2,3,5)
1039 ''this is about '''foo's family'''''
1041 <p><i>this is about <b>foo's family</b></i>
1047 Italics and bold: other quote tests: (2,(3,3),2)
1049 ''this is about '''foo's''' family''
1051 <p><i>this is about <b>foo's</b> family</i>
1057 Italics and bold: other quote tests: (3,2,3,2)
1061 '''this is about ''foo'''s family''
1063 <p><b>this is about <i>foo</i></b><i>s family</i>
1068 # same html as previous, but wikitext adjusted to match parsoid html2wt
1070 Italics and bold: other quote tests: (3,2,3+2+2,2)
1072 '''this is about ''foo'''''<nowiki/>''s family''
1074 <p><b>this is about <i>foo</i></b><i>s family</i>
1080 Italics and bold: other quote tests: (3,2,3,3)
1082 '''this is about ''foo'''s family'''
1084 <p>'<i>this is about </i>foo<b>s family</b>
1090 Italics and bold: other quote tests: (3,(2,2),3)
1092 '''this is about ''foo's'' family'''
1094 <p><b>this is about <i>foo's</i> family</b>
1100 Italicized possessive
1102 The ''[[Main Page]]'''s talk page.
1104 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1107 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1111 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1112 (Requires tidy for PHP parser output to be fixed up)
1114 parsoid=wt2html,wt2wt
1131 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1132 <td><i>a</i></td><td><i>b</i></td></tr>
1141 Non-html5 tags should be accepted
1143 <center>''foo''</center>
1145 <font>''foo''</font>
1146 <strike>''foo''</strike>
1149 <center><i>foo</i></center>
1150 <p><big><i>foo</i></big>
1151 <font><i>foo</i></font>
1152 <strike><i>foo</i></strike>
1158 <wbr> is valid wikitext (bug 52468)
1166 # <strike> is HTML4, <s> is HTML4/5.
1168 <s> or <strike> for strikethrough
1170 <strike>strike</strike>
1174 <p><strike>strike</strike>
1182 Text-level semantic html elements in wikitext
1185 <strong>text</strong>
1201 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1208 <strong>text</strong>
1224 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1232 # test cases taken from
1233 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1235 Ruby markup (W3C-style)
1237 ; Mono-ruby for individual base characters
1238 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1240 : <ruby>今日<rt>きょう</rt></ruby>
1242 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1244 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1246 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1248 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1249 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1250 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1253 <dl><dt> Mono-ruby for individual base characters</dt>
1254 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1255 <dt> Group ruby</dt>
1256 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1257 <dt> Jukugo ruby</dt>
1258 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1259 <dt> Inline ruby</dt>
1260 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1261 <dt> Double-sided ruby</dt>
1262 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1264 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1265 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1266 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1271 # The next two test different paths in the sanitizer.
1273 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1275 <blockquote|>a</blockquote>
1277 <b→> doesn't terminate </b→>
1279 <bä> doesn't terminate </bä>
1281 <boo> doesn't terminate </boo>
1283 <s.foo> doesn't terminate </s.foo>
1287 <p><blockquote|>a</blockquote>
1288 </p><p><b→> doesn't terminate </b→>
1289 </p><p><bä> doesn't terminate </bä>
1290 </p><p><boo> doesn't terminate </boo>
1291 </p><p><s.foo> doesn't terminate </s.foo>
1292 </p><p><sub-ID#1>
1296 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1297 # If the non-word-character tag made it through the sanitizer, tidy
1298 # would munge it up.
1300 Non-word characters don't terminate tag names + tidy
1302 <blockquote|>a</blockquote>
1304 <b→> doesn't terminate </b→>
1306 <bä> doesn't terminate </bä>
1308 <boo> doesn't terminate </boo>
1310 <s.foo> doesn't terminate </s.foo>
1314 <p><blockquote|>a</p>
1315 <p><b→> doesn't terminate </b→></p>
1316 <p><bä> doesn't terminate </bä></p>
1317 <p><boo> doesn't terminate </boo></p>
1318 <p><s.foo> doesn't terminate </s.foo></p>
1319 <p><sub-ID#1></p>
1323 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1324 ### This checks that HTML5 tags (with non-word characters in the tag
1325 ### name) make it safely through the parser -- the Sanitizer will
1326 ### munge them later, as it should.
1329 Non-word characters are valid in extension tags (T19663)
1340 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1344 Isolated close tags should be treated as literal text (bug 52760)
1352 <p><s.foo>s</p>
1354 <p><s.foo>s</p>
1358 ### Special characters
1362 Bare pipe character (bug 52363)
1371 Bare pipe character from a template (bug 52363)
1380 ### <nowiki> test cases
1384 <nowiki> unordered list
1386 <nowiki>* This is not an unordered list item.</nowiki>
1388 <p>* This is not an unordered list item.
1391 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1397 <nowiki>Lorem ipsum dolor
1405 <p>Lorem ipsum dolor
1414 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1426 :There is not nowiki.
1427 :There is <nowiki>nowiki</nowiki>.
1429 #There is not nowiki.
1430 #There is <nowiki>nowiki</nowiki>.
1432 *There is not nowiki.
1433 *There is <nowiki>nowiki</nowiki>.
1435 <dl><dd>There is not nowiki.</dd>
1436 <dd>There is nowiki.</dd></dl>
1437 <ol><li>There is not nowiki.</li>
1438 <li>There is nowiki.</li></ol>
1439 <ul><li>There is not nowiki.</li>
1440 <li>There is nowiki.</li></ul>
1443 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1444 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1446 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1447 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1449 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1450 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1454 Entities inside <nowiki>
1456 <nowiki><</nowiki>
1463 Entities inside template parameters
1469 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1473 Properly escape nowiki when combined with other wiki markup
1477 <p>* </nowiki> tag</p>
1479 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1483 T93824: Put escaped HTML tags inside nowiki
1487 <p><h2>foo</h2></p>
1489 <nowiki><h2>foo</h2></nowiki>
1493 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1497 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1498 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1499 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1501 This text: L'[[Foo]]
1502 This text: L<nowiki>''</nowiki>[[Foo]]
1503 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1506 # This test fails because wikitext whitespace is not normalized before comparing.
1508 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1512 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1515 This text : L<nowiki>''</nowiki>[[Foo]]
1518 # This test and the next one are html2wt only as they test that incorrect wikitext
1519 # passed in template arguments gets escaped or wrapped in nowikis where required.
1521 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1525 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1526 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1528 {{echo|foo{{!}}bar}}
1529 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1533 T53961: Output correct nowikis in template arguments
1537 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1538 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1539 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1540 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1541 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1544 {{echo|<nowiki>a }} b</nowiki>}}
1545 {{echo|<nowiki>a [[ b</nowiki>}}
1546 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1547 {{echo|a <nowiki>}</nowiki>}}
1551 Cases where "!!" needs nowiki protection
1556 <tr><th>this needs protection !! here</th></tr>
1560 <tr><th>this does not need
1561 protection !! here</th></tr>
1565 !<nowiki>this needs protection !! here</nowiki>
1578 Comments and Indent-Pre
1580 <!-- comment 1 --> asdf
1582 <!-- comment 1 --> asdf
1585 <!-- comment 1 --> asdf
1586 <!-- comment 2 -->xyz
1588 <!-- comment 1 --> asdf
1589 <!-- comment 2 --> xyz
1645 asdf<!-- comment 1 -->jkl
1655 <!-- foo --> b <!-- bar -->
1669 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1675 Comment semantics and delimiters
1677 <!-- --><!----><!-----><!------>
1681 <!-- --><!----><!-----><!------>
1685 Comment semantics and delimiters, redux
1687 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1688 -- foo -- funky huh? ... -->
1692 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1693 -- foo -- funky huh? ... -->
1697 Comment semantics and delimiters: directors cut
1699 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1700 everything starting with < followed by !-- until the first -- and > we see,
1701 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1707 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1708 everything starting with < followed by !-- until the first -- and > we see,
1709 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1714 Comment semantics: nesting
1716 <!--<!-- no, we're not going to do anything fancy here -->-->
1721 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1724 # Parsoid closes the unclosed comment, even if it means a slight
1727 Comment semantics: unclosed comment at end
1729 parsoid=wt2html,html2html
1731 <!--This comment will run out to the end of the document
1735 <!--This comment will run out to the end of the document-->
1739 Comment semantics: normalize comments to play nice with XML and browsers
1741 <!-- Browsers --!> think this is closed -->
1742 <!--> This would normally be text -->
1743 <!---> As would this -->
1744 <!-- XML doesn't like trailing dashes -------->
1745 <!-- Nor doubled hyphens -- anywhere in the data -->
1746 But this is not a comment.
1748 <p>But this is not a comment.
1751 <!-- Browsers --!> think this is closed -->
1752 <!--> This would normally be text -->
1753 <!---> As would this -->
1754 <!-- XML doesn't like trailing dashes -------->
1755 <!-- Nor doubled hyphens -- anywhere in the data -->
1756 <p>But this is not a comment.</p>
1760 Comment semantics: round-trip even text which contains encoded -->
1762 <!-- hello & goodbye - > --> --&gt; --&xx -->
1764 <!-- hello & goodbye - > --> --&gt; --&xx -->
1768 Comment in template title
1777 Comment on its own line post-expand
1789 Comment on its own line post-expand with non-significant whitespace
1801 Multiple comments should still parse as SOL-transparent
1803 parsoid=wt2html,wt2wt
1806 <!--c2--><!--c3--><!--c4-->*b
1815 <!--c2--><!--c3--><!--c4-->
1822 ### paragraph wrapping tests
1837 Block tag on one line (<div>)
1853 Block tag on one line (<blockquote>)
1855 a <blockquote>foo</blockquote>
1859 a <blockquote>foo</blockquote>
1871 Block tag on both lines (<div>)
1888 Block tag on both lines (<blockquote>)
1890 a <blockquote>foo</blockquote>
1892 b <blockquote>foo</blockquote>
1894 a <blockquote>foo</blockquote>
1895 b <blockquote>foo</blockquote>
1909 Multiple lines without block tags
1933 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1934 # So, we have a separate section for Parsoid. We don't want
1935 # to mimic this stripping behavior in Parsoid. It affects
1936 # editing experience and also requires us to maintain additional
1939 Empty lines between lines with block tags
1977 <div data-parsoid='{"stx":"html"}'></div>
1980 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1983 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1985 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1988 <div data-parsoid='{"stx":"html"}'>e</div>
1991 ## PHP parser emits output which is broken
1993 Unclosed HTML p-tags should be handled properly
2006 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2011 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2012 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2015 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2019 a [[Category:A1]] [[Category:A2]]
2024 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2028 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2034 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2038 ### Preformatted text
2047 And a [[Main Page|link]]
2053 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2058 Tabs don't trigger preformatted text
2062 This is preformatted text.
2068 <pre>This is preformatted text.
2073 preformatted text.</p>
2074 <pre>This is preformatted text.
2079 Space before tab needs nowiki pre protection
2085 <nowiki> </nowiki> a
2089 Ident preformatting with inline content
2100 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2117 Regression with preformatted in <center>
2131 Bug 52763: Preformatted in <blockquote>
2137 indented cell (no pre-wrapping!)
2147 <p> indented cell (no pre-wrapping!)
2155 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2172 Bug 15491: <ins>/<del> in blockquote
2175 Foo <del>bar</del> <ins>baz</ins> quux
2179 <p>Foo <del>bar</del> <ins>baz</ins> quux
2185 # Note that the p-wrapping is newline sensitive, which could be
2186 # considered a bug: tidy will wrap only the 'Foo' in the example
2187 # below in a <p> tag. (see comment 23-25 of bug #6200)
2189 Bug 15491: <ins>/<del> in blockquote (2)
2191 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2194 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2200 <del>bar</del> <ins>baz</ins> quux</blockquote>
2204 <pre> with attributes (bug 3202)
2206 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2208 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2213 <pre> with width attribute (bug 3202)
2215 <pre width="8">Narrow screen goodies</pre>
2217 <pre width="8">Narrow screen goodies</pre>
2222 <pre> with forbidden attribute (bug 3202)
2224 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2226 <pre width="8">Narrow screen goodies</pre>
2231 Entities inside <pre>
2240 <pre> with forbidden attribute values (bug 3202)
2242 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2244 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2249 <nowiki> inside <pre> (bug 13238)
2257 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2265 <pre><nowiki>Foo</nowiki></pre>
2270 <nowiki> inside of #tag:pre
2272 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2274 <pre>Foo →bar</pre>
2277 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"#tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2281 <nowiki> and <pre> preference (first one wins)
2310 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2312 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2315 <p><span typeof="mw:Nowiki">
2324 </pre> inside nowiki
2326 <nowiki></pre></nowiki>
2332 # Parsoid doesn't strip empty tags, like Tidy does.
2334 Empty pre; pre inside other HTML tags (bug 54946)
2336 parsoid=wt2html,wt2wt
2367 HTML pre followed by indent-pre
2377 # Note that tidy removes the empty <p> tags from the start and end.
2378 # Parsoid does not, by design.
2382 <p><pre>foo</pre></p>
2388 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2392 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2400 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2410 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2422 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2443 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2447 {{echo| foo}}{{echo| bar}}
2452 {{echo|<!--cmt--> foo}}
2454 <!--cmt-->{{echo| foo}}
2456 {{echo|{{echo| }}bar}}
2474 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2511 Pres with newline attributes
2516 <pre class="one two">hi</pre>
2520 two" data-parsoid='{"stx":"html"}'>hi</pre>
2524 Things that look like <pre> tags aren't treated as such
2526 Barack Obama <President> of the United States
2527 <President></President>
2529 <p>Barack Obama <President> of the United States
2530 <President></President>
2535 Handle broken pre-like tags (bug 64025)
2539 {{echo|<pre <pre>x</pre>}}
2541 <table><pre </table>
2544 <table><pre </table>
2552 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2561 Parsoid: handle pre with space after attribute
2565 <pre style="width:50%;" >{{echo|foo}}</pre>
2567 <pre style="width:50%;">{{echo|foo}}</pre>
2570 <pre style="width:50%;">{{echo|foo}}</pre>
2573 # TODO / maybe: fix wt2wt for this
2575 Parsoid: Don't paragraph-wrap fosterable content
2601 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2629 #--------------------------------------------------------------------
2630 # Transclusion parameter whitespace stripping tests
2631 # Behavior is different for positional and named parameters
2632 #--------------------------------------------------------------------
2634 Templates: Strip leading and trailing whitespace from named-param values
2638 {{echo|1= {{echo|b}} }}
2651 <ul><li> d</li></ul>
2656 Templates: Don't strip whitespace from positional-param values
2660 {{echo|{{echo|b}} }}
2692 <ul><li> f</li></ul>
2700 Templates: Handle empty comment-and-ws-only lines correctly
2703 <!--should be ignored-->
2704 <!--should be ignored as well-->
2713 Templates: Handle comments in the target
2716 <!-- should be ignored -->
2719 {{echo<!-- should be ignored -->
2722 {{echo<!-- should be ignored -->|foo}}
2724 {{<!-- should be ignored -->echo|foo}}
2726 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2728 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2730 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2732 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2736 Templates: Handle comments in parameter names (bug 67657)
2739 <!-- should be ignored -->
2743 <!-- should be ignored -->
2746 {{echo|1<!-- should be ignored -->=foo}}
2748 {{echo|<!-- should be ignored -->1=foo}}
2750 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2752 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
2754 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2756 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
2760 Templates: Other wikitext in parameter names (bug 67657)
2764 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2770 #--------------------------------------------------------------------
2771 # Transclusion parameter escaping tests
2772 #--------------------------------------------------------------------
2774 Templates: Parsoid parameter escaping test 1
2776 {{echo|[foo]|{{echo|[bar]}}}}
2780 <p about="#mwt1" typeof="mw:Transclusion"
2781 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2785 Parsoid: Pipes in external links in template parameter
2787 {{echo|[{{echo|http://example.com}} link]}}
2789 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2791 <p><a rel="mw:ExtLink" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
2795 Parsoid: pipe in transclusion parameter
2797 {{echo|http://foo.com/a|b}}
2799 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2801 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2802 typeof="mw:Transclusion"
2803 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a|b</a></p>
2807 Parsoid: Pipe in external link target and content in template parameter
2809 parsoid=html2wt,wt2wt
2811 {{echo|[http://foo.com/a|b a|b]}}
2813 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2815 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2816 typeof="mw:Transclusion"
2817 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2818 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2822 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2826 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2828 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
2832 Templates: Don't escape already nowiki-escaped text in template parameters
2834 parsoid=html2wt,wt2wt
2836 {{echo|foo<nowiki>|</nowiki>bar}}
2837 {{echo|<nowiki><div></nowiki>}}
2838 {{echo|<nowiki></nowiki>}}
2840 <p>foo|bar <div></p>
2842 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
2843 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
2844 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
2850 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2852 parsoid=html2wt,wt2wt
2854 {{echo|{{echo|1=bar}}}}
2858 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
2863 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2869 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
2874 Templates: Preserve blank parameter names
2880 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2884 Templates: Preserve blank parameter names in other positions
2886 {{blank_param|bar|=foo}}
2890 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
2895 ### Parsoid-centric tests for testing RT edge cases for pre
2899 1a. Indent-Pre and Comments
2912 1b. Indent-Pre and Comments
2925 1c. Indent-Pre and Comments
2938 1d. Indent-Pre and Comments
2939 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2952 2a. Indent-Pre and tables
2973 2b. Indent-Pre and tables
2989 2c. Indent-Pre and tables (bug 42252)
3006 2d. Indent-Pre and tables
3023 <tbody><tr><td> b</td></tr>
3028 2e. Indent-Pre and table-line syntax
3041 2f. Indent-pre started by table-line syntax
3060 2g. Indented table markup mixed with indented pre content (proposed in bug 6200)
3065 Text that should be rendered preformatted
3073 <pre>Text that should be rendered preformatted
3082 3a. Indent-Pre and block tags (single-line html)
3086 c <blockquote> foo </blockquote>
3091 c <blockquote> foo </blockquote>
3092 <pre><span> foo </span>
3095 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3096 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3097 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3098 <pre><span> foo </span>
3115 3b. Indent-Pre and block tags (multi-line html)
3120 <pre>a <span>foo</span>
3125 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3126 b <div data-parsoid='{"stx":"html"}'> foo </div>
3136 3c. Indent-Pre and block tags (pre-content on separate line)
3200 4. Indent-Pre and extension tags
3211 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3215 Render paragraphs when indent-pre is suppressed in blocklevels
3232 4. Multiple spaces at start-of-line
3250 ## NOTE: the leading white-space chars on empty line are significant
3252 5a. White-space in indent-pre
3264 ## NOTE: the leading white-space chars on empty line are significant
3266 5b. White-space in indent-pre
3285 5c. White-space in indent-pre
3298 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3321 7a. Indent-pre and category links
3323 parsoid=wt2html,wt2wt
3325 [[Category:foo]] <!-- No pre-wrapping -->
3326 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3329 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3330 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3333 ## We used to, but no longer wt2wt this test since the default serializer
3334 ## will normalize all categories to serialize on their own line.
3335 ## This wikitext usage is going to be fairly uncommon in production and
3336 ## selser will take care of preserving formatting in those scenarios.
3338 7b. Indent-pre and category links
3343 [[Category:foo]] {{echo|b}}
3345 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3346 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3350 Indent-Pre: Newlines in comments shouldn't affect sol state
3364 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3368 HTML-pre: 1. embedded newlines
3403 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3405 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3409 <pre data-parsoid='{"stx":"html"}'>
3414 <pre data-parsoid='{"stx":"html"}'>
3422 HTML-pre: big spaces
3458 <pre data-parsoid='{"stx":"html"}'>
3477 HTML-pre: 2: indented text
3490 HTML-pre: 3: other wikitext
3509 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3518 ### Definition lists
3525 <dl><dt> name </dt>
3526 <dd> Definition</dd></dl>
3531 Definition list for indentation only
3535 <dl><dd> Indented text</dd></dl>
3540 Definition list with no space
3545 <dd>Definition</dd></dl>
3550 Definition list with URL link
3552 ; http://example.com/ : definition
3554 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3555 <dd> definition</dd></dl>
3560 Definition list with bracketed URL link
3562 ;[http://www.example.com/ Example]:Something about it
3564 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3565 <dd>Something about it</dd></dl>
3570 Definition list with wikilink containing colon
3572 ; [[Help:FAQ]]: The least-read page on Wikipedia
3574 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
3575 <dd> The least-read page on Wikipedia</dd></dl>
3579 # At Brion's and JeLuF's insistence... :)
3581 Definition list with news link containing colon
3583 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3585 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3586 <dd> This isn't even a real newsgroup!</dd></dl>
3589 <dl><dt> <a rel="mw:ExtLink" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'> This isn't even a real newsgroup!</dd></dl>
3593 Malformed definition list with colon
3595 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3597 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
3602 Definition lists: colon in external link text
3604 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3606 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3607 <dd> OK, I made that up</dd></dl>
3612 Definition lists: colon in HTML attribute
3614 ;<b style="display: inline">bold</b>
3616 <dl><dt><b style="display: inline">bold</b></dt></dl>
3621 Definition lists: self-closed tag
3623 ;one<br/>two : two-line fun
3625 <dl><dt>one<br />two </dt>
3626 <dd> two-line fun</dd></dl>
3631 Bug 11748: Literal closing tags
3635 <dd>test test test test test</dd>
3637 <dd>test test test test test</dd>
3642 <dd>test test test test test</dd>
3644 <dd>test test test test test</dd>
3650 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3653 ; term : description
3658 <dl><dt> term </dt>
3659 <dd> description</dd></dl>
3660 <ul><li> unordered</li></ul>
3667 Definition list with empty definition and following paragraph
3679 Nested definition lists using html syntax
3692 Definition Lists: No nesting: Multiple dd's
3705 Definition Lists: Indentation: Regular
3713 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3718 Definition Lists: Indentation: Missing 1st level
3724 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3729 Definition Lists: Indentation: Multi-level indent
3733 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3738 Definition Lists: Hacky use to indent tables
3745 should be left alone
3747 <dl><dd><dl><dd><table>
3752 </td></tr></table></dd></dl></dd></dl>
3754 should be left alone
3759 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3767 should be left alone
3770 <dl><dd><dl><dd><table><tr>
3773 </tr></table><!-- bar --></dd></dl></dd></dl>
3775 should be left alone</p>
3779 Definition Lists: Hacky use to indent tables, with comment before table
3785 <dl><dd><dl><dd><!-- foo --><table><tr>
3787 </tr></table></dd></dl></dd></dl>
3790 # The trailing whitespace in this test is to catch a regression in
3791 # Parsoid after T54473.
3793 Definition Lists: Hacky use to indent tables (WS-insensitive)
3802 </td></tr></table></dd></dl>
3806 <tbody><tr><td>a</td></tr>
3807 </tbody></table> </dd></dl>
3810 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3811 ## as an empty dt item. It also ignores all but the last ";" when followed
3812 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3813 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3816 ## Ex: ";;t2 ::d2" is transformed into:
3828 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3829 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3840 ## All Parsoid only definition list tests have this difference.
3842 ## See also: https://phabricator.wikimedia.org/T8569
3843 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3846 Table / list interaction: indented table with lists in table contents
3861 <ul><li> b</li></ul>
3865 <ul><li> d</li></ul>
3866 </td></tr></table></dd></dl>
3871 Table / list interaction: lists nested in tables nested in indented lists
3894 </td></tr></table></dd></dl>
3901 Definition Lists: Nesting: Multi-level (Parsoid only)
3931 Definition Lists: Nesting: Test 2 (Parsoid only)
3958 Definition Lists: Nesting: Test 3 (Parsoid only)
4001 Definition Lists: Nesting: Test 4
4006 <dl><dd><dl><dd><dl><dt>t3</dt>
4007 <dd>d3</dd></dl></dd></dl></dd></dl>
4012 ## The Parsoid team believes the following three test exposes a
4013 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4014 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4015 ## It also exposes a "misfeature" in tidy, which doesn't like
4016 ## <dl> tags with a single <dt> child; it converts the <dt> into
4017 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4019 Definition Lists: Mixed Lists: Test 1
4025 <dl><dd><dl><dt><ul><li> foo</li>
4026 <li> bar</li></ul></dt></dl>
4027 <dl><dt> baz</dt></dl></dd></dl>
4062 Definition Lists: Mixed Lists: Test 2
4067 <ul><li><dl><dd> d1</dd>
4068 <dd> d2</dd></dl></li></ul>
4074 Definition Lists: Mixed Lists: Test 3
4079 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4080 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4086 Definition Lists: Mixed Lists: Test 4
4091 <ul><li><dl><dt>d1 </dt>
4094 <dd>d4</dd></dl></li></ul>
4100 Definition Lists: Mixed Lists: Test 5
4106 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4112 Definition Lists: Mixed Lists: Test 6
4117 <ol><li><ul><li><dl><dd>d1
4118 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4124 Definition Lists: Mixed Lists: Test 7
4129 <dl><dd><ul><li> d1</li>
4130 <li> d2</li></ul></dd></dl>
4136 Definition Lists: Mixed Lists: Test 8
4141 <dl><dd><ul><li> d1</li></ul>
4142 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4148 Definition Lists: Mixed Lists: Test 9
4152 <ul><li><dl><dt>foo </dt>
4153 <dd>bar</dd></dl></li></ul>
4159 Definition Lists: Mixed Lists: Test 10
4163 <ul><li><ol><li><dl><dt>foo </dt>
4164 <dd>bar</dd></dl></li></ol></li></ul>
4168 # The Parsoid team disagrees with the PHP parser's seemingly-random
4169 # rules regarding dd/dt on the next two tests. Parsoid is more
4170 # consistent, and recognizes the shared nesting and keeps the
4171 # still-open tags around until the nesting is complete.
4172 # (And tidy again converts <dt> to <dd> before 'bar'.)
4175 Definition Lists: Mixed Lists: Test 11
4180 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4181 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4182 <dl><dt>boo </dt>
4183 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4238 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4239 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4243 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4244 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4253 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4255 # * The test is wrong, there are two colons where there should be :;
4256 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4258 Definition Lists: Weird Ones: Test 1
4260 *#;*::;; foo : bar (who uses this?)
4262 <ul><li><ol><li><dl><dt> foo </dt>
4263 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dd></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4282 <dt>bar (who uses this?)</dt>
4314 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4315 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4327 Definition Lists: colons occurring in tags
4345 <dt><span>a:b</span></dt>
4372 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4374 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4375 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4376 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4377 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4379 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4380 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4381 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4385 Definition Lists: colons and tables 1
4397 </td></tr></table></dd></dl>
4401 </td></tr></table></dd></dl>
4405 # Parsoid's output (as documented below) differs from php's in this case.
4406 # This is probably a bug. If we fixup parsoid to match php's output, the
4407 # above test should pass and the below test case can be removed. It is
4408 # unclear which output is more desirable.
4411 Definition Lists: colons and tables 2
4423 </td></tr></table></dd>
4427 </td></tr></table></dd></dl>
4431 Definition Lists: template interaction
4433 ::{{definition_list}}
4436 ::{{definition_list}}
4441 <dl><dd><dl data-parsoid='{}'><dd about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[":",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}}]}'>one</dd><span about="#mwt1">
4442 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4444 <dl><dd data-parsoid='{}'>one
4445 <dl><dd about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":["::",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}},"\n:::two\n:::three"]}'>one</dd><span about="#mwt2">
4446 </span><dd about="#mwt2">two
4448 <dd>three</dd></dl></dd>
4449 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4457 External links: non-bracketed
4459 Non-bracketed: http://example.com
4461 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4465 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4467 External links: numbered
4469 Numbered: [http://example.com]
4470 Numbered: [http://example.net]
4471 Numbered: [http://example.com]
4473 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4474 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4475 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4478 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4479 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4480 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4484 External links: specified text
4486 Specified text: [http://example.com link]
4488 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4493 External links: trail
4495 Linktrails should not work for external links: [http://example.com link]s
4497 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4502 External links: dollar sign in URL
4504 http://example.com/1$2345
4506 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4510 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4512 External links: dollar sign in URL (autonumber)
4514 [http://example.com/1$2345]
4516 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4519 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4523 External links: open square bracket forbidden in URL (bug 4377)
4525 parsoid=wt2html,wt2wt,html2html
4527 http://example.com/1[2345
4529 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4532 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4536 External links: open square bracket forbidden in URL (named) (bug 4377)
4538 parsoid=wt2html,html2html
4540 [http://example.com/1[2345]
4542 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4545 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4548 # parsoid adds a space before the link name
4550 External links: open square bracket forbidden in URL (named) (bug 4377)
4553 [http://example.com/1 [2345]
4555 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4560 External links: nowiki in URL link text (bug 6230)
4562 [http://example.com/ <nowiki>''example site''</nowiki>]
4564 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4569 External links: newline forbidden in text (bug 6230 regression check)
4571 [http://example.com/ first
4574 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4580 External links: Pipe char between url and text
4582 [http://example.com | link]
4584 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4589 External links: protocol-relative URL in brackets
4591 [//example.com/ Test]
4593 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4597 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4599 External links: protocol-relative URL in brackets without text
4603 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4606 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4610 External links: protocol-relative URL in free text is left alone
4614 <p>//example.com/Foo
4619 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4621 foo//example.com/Foo
4623 <p>foo//example.com/Foo
4628 External links: with no contents
4630 [http://en.wikipedia.org/wiki/Foo]
4632 [[wikipedia:Foo|Bar]]
4634 [[wikipedia:Foo|<span>Bar</span>]]
4636 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4637 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4638 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4641 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4642 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4643 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4647 External links: Free with trailing punctuation
4657 http://example.com/url_with_(brackets)
4658 (http://example.com/url_without_brackets)
4659 http://example.com/url_with_entity&
4660 http://example.com/url_with_entity&
4661 http://example.com/url_with_entity&
4662 http://example.com/url_with_entity
4663 http://example.com/url_with_entity 
4664 http://example.com/url_with_entity 
4665 http://example.com/url_with_entity<
4666 http://example.com/url_with_entity<
4667 http://example.com/url_with_entity<
4669 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4670 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4671 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4672 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4673 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4674 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4675 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4676 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4677 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4678 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4679 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4680 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4681 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4682 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4683 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4684 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4685 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4686 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4687 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4690 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4691 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4692 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4693 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4694 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4695 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4696 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4697 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4698 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4699 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4700 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4701 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4702 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4703 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4704 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4705 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4706 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4707 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4708 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
4712 External links: tricky Parsoid html2html case
4714 parsoid=wt2html,wt2wt,html2html
4716 http://example.com/url_with_entity&amp;
4718 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4721 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4725 External links: Free with trailing quotes (T113666)
4727 '''News:''' Stuff here
4731 <p><b>News:</b> Stuff here
4732 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4735 <p><b>News:</b> Stuff here</p>
4736 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4740 External links: Lone protocols are never linked (T105697)
4759 External links: No preceding word characters allowed (bug 65278)
4761 NOPEhttp://example.com
4762 N0http://example.com
4763 ok:http://example.com
4764 ok-http://example.com
4766 <p>NOPEhttp://example.com
4767 N0http://example.com
4768 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4769 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4774 External links: nofollow domain exception
4776 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4778 <p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
4785 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4787 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4792 External image from https
4794 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4796 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4801 External image (when not allowed)
4803 wgAllowExternalImages=0
4805 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4807 <p>External image: <a rel="nofollow" class="external free" href="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png">http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png</a>
4812 Link to non-http image, no img tag
4814 Link to non-http image, no img tag: ftp://example.com/test.jpg
4816 <p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a>
4821 External links: terminating separator
4823 Terminating separator: http://example.com/thing,
4825 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4830 External links: intervening separator
4832 Intervening separator: http://example.com/1,2,3
4834 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4839 External links: old bug with URL in query
4841 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4843 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4848 External links: old URL-in-URL bug, mixed protocols
4850 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4852 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4856 # Since Parsoid is starting to emit canonical wikitext for links,
4857 # [http://example.com http://example.com] will not RT back to that
4860 External links: URL in text
4864 URL in text: [http://example.com http://example.com]
4866 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4869 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4873 External links: Clickable images
4875 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4877 <p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/></a>
4880 <p>ja-style clickable images: <a rel="mw:ExtLink" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
4884 External links: raw ampersand
4886 Old & use: http://x&y
4888 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4893 External links: encoded ampersand
4895 Old & use: http://x&y
4897 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4900 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4904 External links: encoded equals (bug 6102)
4906 http://example.com/?foo=bar
4908 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4911 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4915 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4916 ## does it number them. As discussed in bug 53505, we can identify
4917 ## autonumbered links via CSS.
4921 External links: [raw ampersand]
4923 Old & use: [http://x&y]
4925 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4928 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4931 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4932 # mode will return the [raw ampersand] wikitext
4934 External links: [encoded ampersand]
4936 parsoid=wt2html,wt2wt,html2html
4938 Old & use: [http://x&y]
4940 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4943 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4947 External links: [raw equals]
4949 [http://example.com/?foo=bar]
4951 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4954 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4957 # note that parsoid html is identical to [raw equals] case; so html2wt
4958 # mode will return the [raw equals] wikitext
4960 External links: [encoded equals] (bug 6102)
4962 parsoid=wt2html,wt2wt,html2html
4964 [http://example.com/?foo=bar]
4966 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4969 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4972 # xxx parsoid strips the IDN character, so the round-trip tests will
4973 # obviously fail and are disabled. --cscott
4975 External links: [IDN ignored character reference in hostname; strip it right off]
4977 parsoid=wt2html,wt2wt,html2html
4979 [http://e‌xample.com/]
4981 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4984 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4987 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4988 # Where an external link could easily circumvent the sanitization of the text of
4989 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4990 # test demands a higher standard. That's a bit strange.
4994 # http://example.com -> [http://example.com|http://example.com]
4995 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4997 # The first example is sanitized, but the second is not. Any security benefits
4998 # from this production are trivial to circumvent. Either remove this test and
4999 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5000 # the test accordingly.
5004 # xxx parsoid strips the IDN character, so the round-trip tests will
5005 # obviously fail and are disabled. --cscott
5007 External links: IDN ignored character reference in hostname; strip it right off
5009 parsoid=wt2html,html2html
5011 http://e‌xample.com/
5013 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5016 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5020 External links: www.jpeg.org (bug 554)
5024 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5028 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5030 External links: URL within URL (original bug 2)
5032 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5034 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5037 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5041 BUG 361: URL inside bracketed URL
5043 [http://www.example.com/foo http://www.example.com/bar]
5045 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5050 BUG 361: URL within URL, not bracketed
5052 http://www.example.com/foo?=http://www.example.com/bar
5054 <p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a>
5059 BUG 289: ">"-token in URL-tail
5061 http://www.example.com/<hello>
5063 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5068 BUG 289: literal ">"-token in URL-tail
5070 http://www.example.com/<b>html</b>
5072 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5075 <p><a rel="mw:ExtLink" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
5079 BUG 289: ">"-token in bracketed URL
5081 [http://www.example.com/<hello> stuff]
5083 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5088 BUG 289: literal ">"-token in bracketed URL
5090 [http://www.example.com/<b>html</b> stuff]
5092 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5097 BUG 289: literal double quote at end of URL
5099 http://www.example.com/"hello"
5101 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5106 BUG 289: literal double quote in bracketed URL
5108 [http://www.example.com/"hello" stuff]
5110 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5115 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5117 [http://www.example.com test]
5119 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5124 External links: link text with spaces
5126 [http://www.example.com a b c]
5127 [http://www.example.com ''a'' ''b'']
5129 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5130 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5135 External links: wiki links within external link (Bug 3695)
5137 parsoid=wt2html,html2html
5139 [http://example.com [[wikilink]] embedded in ext link]
5141 <p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
5144 <p><a rel="mw:ExtLink" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5148 BUG 787: Links with one slash after the url protocol are invalid
5152 [http:/example.com title]
5154 <p>http:/example.com
5155 </p><p>[http:/example.com title]
5160 Bracketed external links with template-generated invalid target
5162 [{{echo|http:/example.com}} title]
5164 <p>[http:/example.com title]
5169 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5171 ''[http://example.com text'']
5172 [http://example.com '''text]'''
5173 ''Something [http://example.com in italic'']
5174 ''Something [http://example.com mixed''''', even bold]'''
5175 '''''Now [http://example.com both''''']
5177 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5178 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5179 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5180 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5181 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5187 Bug 4781: %26 in URL
5189 http://www.example.com/?title=AT%26T
5191 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5194 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5197 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5198 # % is actually legal in HTML5. Any change in output would need testing though.
5200 Bug 4781, 5267: %25 in URL
5202 http://www.example.com/?title=100%25_Bran
5204 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
5207 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5211 Bug 4781, 5267: %28, %29 in URL
5213 http://www.example.com/?title=Ben-Hur_%281959_film%29
5215 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
5218 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
5223 Bug 4781: %26 in autonumber URL
5225 [http://www.example.com/?title=AT%26T]
5227 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5230 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5234 Bug 4781, 5267: %26 in autonumber URL
5236 [http://www.example.com/?title=100%25_Bran]
5238 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5241 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5245 Bug 4781, 5267: %28, %29 in autonumber URL
5247 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5249 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5252 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5257 Bug 4781: %26 in bracketed URL
5259 [http://www.example.com/?title=AT%26T link]
5261 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5264 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5268 Bug 4781, 5267: %25 in bracketed URL
5270 [http://www.example.com/?title=100%25_Bran link]
5272 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5277 Bug 4781, 5267: %28, %29 in bracketed URL
5279 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5281 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5284 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5288 External link containing a period in the anchor. (bug 63947)
5290 [//foo.org/bar#baz. bang]
5292 [//foo.org/bar. bang]
5294 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5295 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5298 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5299 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5303 External link containing a single quote. (bug 63947)
5307 [//foo.org/bar'baz bang]
5309 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5310 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5313 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5314 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5318 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5320 Some [http://example.com/ pretty ''italics'' and stuff]!
5322 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5327 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5329 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5331 <p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
5336 External link containing double-single-quotes with no space separating the url from text in italics
5338 [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
5340 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de <a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</a>
5343 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de</a> <a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</p>
5345 <p><a rel="mw:ExtLink" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
5349 External link with comments in link text
5351 [http://www.google.com Google <!-- comment -->]
5353 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5356 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5360 External link to bare IPv4 address
5362 [http://192.168.0.1 Link]
5364 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5367 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5371 URL-encoding in URL functions (single parameter)
5373 {{localurl:Some page|amp=&}}
5375 <p>/index.php?title=Some_page&amp=&
5380 URL-encoding in URL functions (multiple parameters)
5382 {{localurl:Some page|q=?&=&}}
5384 <p>/index.php?title=Some_page&q=?&amp=&
5391 http://example.com/index.php?foozoid%5B%5D=bar
5393 http://example.com/index.php?foozoid[]=bar
5395 <p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5396 </p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
5399 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5401 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5405 IPv6 urls, autolink format (T23261)
5407 http://[2404:130:0:1000::187:2]/index.php
5409 Examples from RFC 2373, section 2.2:
5410 * http://[1080::8:800:200C:417A]/unicast
5411 * http://[FF01::101]/multicast
5412 * http://[::1]/loopback
5413 * http://[::]/unspecified
5414 * http://[::13.1.68.3]/ipv4compat
5415 * http://[::FFFF:129.144.52.38]/ipv4compat
5417 Examples from RFC 2732, section 2:
5418 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5419 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5420 * http://[3ffe:2a00:100:7031::1]
5421 * http://[1080::8:800:200C:417A]/foo
5422 * http://[::192.9.5.5]/ipng
5423 * http://[::FFFF:129.144.52.38]:80/index.html
5424 * http://[2010:836B:4179::836B:4179]
5427 <p><a rel="nofollow" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a>
5428 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5430 <ul><li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5431 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5432 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5433 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5434 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5435 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5436 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5438 <ul><li> <a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5439 <li> <a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5440 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5441 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5442 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5443 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5444 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5447 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5449 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5450 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5451 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5452 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5453 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5454 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5455 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5457 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5458 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5459 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5460 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5461 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5462 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5463 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5464 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5468 IPv6 urls, bracketed format (T23261)
5470 [http://[2404:130:0:1000::187:2]/index.php test]
5472 Examples from RFC 2373, section 2.2:
5473 * [http://[1080::8:800:200C:417A] unicast]
5474 * [http://[FF01::101] multicast]
5475 * [http://[::1]/ loopback]
5476 * [http://[::] unspecified]
5477 * [http://[::13.1.68.3] ipv4compat]
5478 * [http://[::FFFF:129.144.52.38] ipv4compat]
5480 Examples from RFC 2732, section 2:
5481 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5482 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5483 * [http://[3ffe:2a00:100:7031::1] 3]
5484 * [http://[1080::8:800:200C:417A]/foo 4]
5485 * [http://[::192.9.5.5]/ipng 5]
5486 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5487 * [http://[2010:836B:4179::836B:4179] 7]
5490 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5491 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5493 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5494 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5495 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5496 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5497 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5498 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5499 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5501 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5502 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5503 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5504 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5505 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5506 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5507 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5510 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5512 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5513 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5514 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5515 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5516 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5517 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5518 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5520 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5521 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5522 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5523 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5524 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5525 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5526 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5527 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5531 Non-extlinks in brackets
5540 [{{echo|foo}} ''bar'']
5541 [{{echo|foo}}l's] errand
5542 [{{echo|foo}}l's errand]
5544 [url=http://example.com]
5545 [http:// bare protocols don't count]
5558 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5559 [http:// bare protocols don't count]
5567 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5568 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5569 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5570 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5571 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5572 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5573 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5574 [http:// bare protocols don't count]</p>
5578 Percent encoding in external links
5580 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5582 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5585 <p><a rel="mw:ExtLink"
5586 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5590 Use url link syntax for links where the content is equal the link target
5594 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5597 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5601 Parenthesis in external links, especially URL links
5605 http://example.com/test)
5607 http://example.com/(test)
5609 http://example.com/((test)
5611 (http://example.com/(test))
5613 (http://example.com/(test)))))
5615 http://example.com/a)b
5617 [http://example.com) foo]
5619 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5620 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5621 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5622 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5623 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5624 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5625 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5626 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5629 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5630 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5631 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5632 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5633 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5634 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5635 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5636 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5640 Parenthesis in external links, w/ transclusion or comment
5642 (http://example.com/{{echo|hi}})
5644 (http://example.com<!-- hi -->)
5646 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5647 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5650 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span>"}]]}'>http://example.com/hi</a>)</p>
5652 <p>(<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
5656 Serialize <a> tags with invalid link targets as plain text
5658 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5660 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5661 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5662 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5663 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5666 <nowiki>*</nowiki>text
5667 <nowiki>[[foo]]</nowiki>
5668 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5672 mw:ExtLink -vs- mw:WikiLink (T94723)
5676 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5677 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5678 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5679 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5681 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5682 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5687 [[wikipedia:Foo|Bar]]
5688 [[wikipedia:Foo|Bar]]
5690 [[wikipedia:European_Robin|European Robin]]
5691 [[wikipedia:European_Robin|European Robin]]
5695 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5699 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5701 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5712 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5714 Normal text. '''''Bold italic text.''''' Normal text.
5716 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5717 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5722 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5723 # parser strips. The wikitext contains just the first half of the bold
5726 Unclosed and unmatched quotes
5728 '''''Bold italic text '''with bold deactivated''' in between.'''''
5730 '''''Bold italic text ''with italic deactivated'' in between.'''''
5734 ..spanning two paragraphs (should not work).'''
5736 '''Bold tag left open
5738 ''Italic tag left open
5742 <!-- Unmatching number of opening, closing tags: -->
5743 '''This year''''s election ''should'' beat '''last year''''s.
5745 ''Tom'''s car is bigger than ''Susan'''s.
5747 Plain ''italic'''s plain
5749 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5750 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5751 </p><p><b>Bold text..</b>
5752 </p><p>..spanning two paragraphs (should not work).
5753 </p><p><b>Bold tag left open</b>
5754 </p><p><i>Italic tag left open</i>
5756 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5757 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5758 </p><p>Plain <i>italic'</i>s plain
5761 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5762 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5763 </p><p><b>Bold text..</b>
5764 </p><p>..spanning two paragraphs (should not work).<b></b>
5765 </p><p><b>Bold tag left open</b>
5766 </p><p><i>Italic tag left open</i>
5769 <!-- Unmatching number of opening, closing tags: -->
5770 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5771 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5772 </p><p>Plain <i>italic'</i>s plain
5779 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5782 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5783 # is the bare minimum required by the spec, see:
5784 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5785 # Parsoid team replies: empty table tags are legal in HTML5
5787 A table with no data.
5800 A table with stray table end tags on start tag line (wt2html)
5804 {|style="color: red;"|}
5806 {|style="color: red;" |}
5810 {|style="color: red;"|} id="foo"
5814 {|style="color: red;" |} id="foo"
5818 <table style="color: red;"></table>
5820 <table style="color: red;">
5826 <table style="color: red;" id="foo">
5832 <table style="color: red;" id="foo">
5841 A table with no data (take 2)
5849 # A table with nothing but a caption is invalid XHTML, we might want to render
5850 # this as <p>caption</p>
5851 # Parsoid team replies: table with only a caption is legal in HTML5
5853 A table with nothing but a caption
5861 </caption><tr><td></td></tr></table>
5864 <table><caption> caption</caption></table>
5868 A table with caption with default-spaced attributes and a table row
5871 |+ style="color: red;" | caption1
5877 <caption style="color: red;"> caption1
5886 A table with captions with non-default spaced attributes and a table row
5889 |+style="color: red;"|caption2
5890 |+ style="color: red;"| caption3
5896 <caption style="color: red;">caption2
5898 <caption style="color: red;"> caption3
5907 Table td-cell syntax variations
5911 | foo bar foo || baz
5912 | style='color:red;' | baz
5913 | style='color:red;' || baz
5920 <td> foo bar foo </td>
5923 <td style="color:red;"> baz
5925 <td> style='color:red;' </td>
5953 Simple table but with multiple dashes for row wikitext
5972 Multiplication table
5974 {| border="1" cellpadding="2"
5975 |+Multiplication table
5977 ! × !! 1 !! 2 !! 3
5995 <table border="1" cellpadding="2">
5996 <caption>Multiplication table
6043 Accept "||" in table headings
6058 Accept "!!" in table data
6072 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'></td></tr>
6077 Accept "||" in indented table headings
6087 </th></tr></table></dd></dl>
6092 Accept "!!" in templates
6106 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["!a ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b!!c"}},"i":0}}]}'>a b</th><th about="#mwt1">c</th></tr>
6110 Accept "!!" in table headings after newline
6127 <p>b!!c</p></th></tr>
6132 Accept "!!" in table data of mixed wikitext / html syntax
6136 <tr><td>b!!c</td></tr>
6149 <tbody><tr><th>a</th></tr>
6150 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6155 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6172 Accept "| !" at start of line in tables (ignore !-attribute)
6176 | !style="color:red" | bar
6188 Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between "|" and +/-
6192 |style='color:red;'|+1
6193 |style='color:blue;'|-1
6205 <td style="color:red;">+1
6207 <td style="color:blue;">-1
6231 |rowspan=2| Cell 2, row 1 (and 2)
6242 <td rowspan="2"> Cell 2, row 1 (and 2)
6260 {| bgcolor=#ABCDEF border=2
6265 |the original table again
6273 <table bgcolor="#ABCDEF" border="2">
6281 <td>the original table again
6287 Invalid attributes in table cell (bug 1830)
6301 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6305 | title="foo<nowiki>|</nowiki>" |bar
6306 | title="foo<nowiki>|</nowiki>" bar
6313 <td title="foo|">bar
6315 <td> title="foo|" bar
6320 <tbody><tr><td title="foo">bar</td>
6321 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6322 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6326 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6327 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6328 # *2wt modes will fail.
6330 Table security: embedded pipes
6332 parsoid=wt2html,html2html
6335 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6339 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6340 <td>]" onmouseover="alert(document.cookie)">test
6348 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6352 Element attributes with double ! should not be broken up by <th>
6355 ! hi <div class="!!">ha</div> ho
6360 <th> hi <div class="!!">ha</div> ho
6365 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6370 ! and || in element attributes should not be parsed as <th>/<td>
6373 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6378 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6383 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6387 # FIXME: The output seems broken. Filed as T110268.
6389 ! and || in td attributes should not be parsed as <th>/<td>
6394 | style="color: red !important;" data-contrived="put this here ||" | foo
6399 <td> style="color: red !important;" data-contrived="put this here </td>
6405 <tbody><tr><td> style="color: red !important;" data-contrived="put this here </td><td data-parsoid='{"stx_v":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'> foo</td></tr>
6410 Break on | in element attribute in template
6412 parsoid=wt2html,html2html
6414 {{echo|1=<div class="hi|ho">ha</div>}}
6416 <p>ho">ha</div>
6419 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</span>
6422 ## We don't support roundtripping of these attributes in Parsoid.
6423 ## Selective serialization takes care of preventing dirty diffs.
6424 ## But, on edits, we dirty-diff the invalid attribute text.
6426 Invalid text in table attributes should be discarded
6430 {| <span>boo</span> style='border:1px solid black'
6431 | <span>boo</span> style='color:blue' | 1
6432 |<span>boo</span> style='color:blue'| 2
6435 <table style="border:1px solid black">
6437 <td style="color:blue"> 1
6439 <td style="color:blue"> 2
6443 <table style="border:1px solid black">
6445 <td style="color:blue"> 1</td>
6446 <td style="color:blue"> 2</td>
6452 Invalid text in table attributes should be preserved by selective serializer
6455 "modes": ["selser"],
6457 ["td:first-child", "text", "abc"],
6458 ["td + td", "text", "xyz"]
6462 {| <span>boo</span> style='border:1px solid black'
6463 | <span>boo</span> style='color:blue' | 1
6464 |<span>boo</span> style='color:blue'| 2
6467 {| <span>boo</span> style='border:1px solid black'
6468 | <span>boo</span> style='color:blue' |abc
6469 |<span>boo</span> style='color:blue'|xyz
6474 1. Template-generated table cell attributes and cell content
6479 || {{table_attribs_5}}
6480 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6481 |align=center {{table_attribs}}
6482 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6487 <td style="color:red;">Foo
6489 <td style="color:red;">Foo
6491 <td> style="color:red;"</td>
6494 <td style="color:red;">Foo
6496 <td align="center" style="color:red;">Foo
6498 <td align="center" style="color:red;">Foo
6504 2. Template-generated table cell attributes and cell content
6507 |{{table_attribs_2}}
6512 <td style="color:red;">Foo
6520 <tbody><tr><td about="#mwt1" typeof="mw:Transclusion" style="color:red;" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_2","href":"./Template:Table_attribs_2"},"params":{},"i":0}}]}'>Foo</td>
6521 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6526 3. Template-generated table cell attributes and cell content
6529 !align=center {{table_header_cells}}
6531 |align=center {{table_cells}}
6536 <th align="center" style="color:red;">Foo</th>
6537 <th style="color:red;"><i>Bar</i></th>
6538 <th style="color:brown;"><i>Foo</i> and Baz
6541 <td align="center" style="color:red;">Foo</td>
6542 <td style="color:red;"><i>Bar</i></td>
6543 <td style="color:brown;"><i>Foo</i> and Baz
6548 <tbody><tr><th align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":0}}]}'>Foo</th><th about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></th><th about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</th></tr><tr>
6549 <td align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":0}}]}'>Foo</td><td about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></td><td about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</td></tr>
6554 4. Template-generated table cell attributes and cell content inside a templated table
6557 !align=center {{table_header_cells}}
6559 |align=center {{table_cells}}
6564 <th align="center" style="color:red;">Foo</th>
6565 <th style="color:red;"><i>Bar</i></th>
6566 <th style="color:brown;"><i>Foo</i> and Baz
6569 <td align="center" style="color:red;">Foo</td>
6570 <td style="color:red;"><i>Bar</i></td>
6571 <td style="color:brown;"><i>Foo</i> and Baz
6575 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":1}},"\n|-\n|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":2}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":3}}]}'>
6576 <tbody><tr><th align="center" style="color:red;">Foo</th><th style="color:red;"><i>Bar</i></th><th style="color:brown;"><i>Foo</i> and Baz</th></tr>
6578 <td align="center" style="color:red;">Foo</td><td style="color:red;"><i>Bar</i></td><td style="color:brown;"><i>Foo</i> and Baz</td></tr>
6582 ## Edge case fix to prevent future regressions
6584 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6587 |{{table_attribs_7}}
6592 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<span class="mw-ref" id="cite_ref-1" rel="dc:references" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></td></tr>
6594 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
6598 Table with row followed by newlines and table heading
6600 parsoid=wt2html,html2html
6618 Table with empty line following the start tag
6620 parsoid=wt2html,html2html
6638 Table attributes with empty value
6640 parsoid=wt2html,html2html
6653 <tbody><tr><td style=""> hello</td></tr>
6658 Wikitext table with a lot of comments
6681 Wikitext table comments represented in parsoid dom
6683 {|<!--c1--><!--c2-->
6694 <table><!--c1--><!--c2-->
6695 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6696 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6701 Wikitext table with double-line table cell
6718 Table cell with a single comment
6735 Table-cell after a comment-only-empty-line
6752 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6754 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6760 Build table with {{!}}
6762 {{{!}} class="wikitable"
6765 {{!}}- style="color:red;"
6766 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6769 <table class="wikitable">
6775 <tr style="color:red;">
6777 <td style="color:red;"> second data
6783 Build table with pipe as data
6785 {| class="wikitable"
6788 |- style="color:red;"
6789 | data || style="color:red;" | second data
6791 | style="color:red;" | data with | || style="color:red;" | second data with |
6793 || data with | ||| second data with |
6796 <table class="wikitable">
6802 <tr style="color:red;">
6804 <td style="color:red;"> second data
6807 <td style="color:red;"> data with | </td>
6808 <td style="color:red;"> second data with |
6811 <td> data with | </td>
6812 <td> second data with |
6818 Build table with wikilink
6820 {| class="wikitable"
6821 ! header || second header
6822 |- style="color:red;"
6823 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6825 | data || second data [[Main Page|link|text with pipe]]
6828 <table class="wikitable">
6833 <tr style="color:red;">
6834 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6835 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6839 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6844 # The expected HTML structure in this test is debatable. The PHP parser does
6845 # not parse this kind of table at all. The main focus for Parsoid is on
6846 # round-tripping, so this output is ok for now. TODO: revisit!
6848 Wikitext table with html-syntax row
6858 <td>foo</td></tr></tbody></table>
6861 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6862 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6863 ## PHP parser, which tidy then compounds by fostering the content
6864 ## entirely out of the table. Parsoid recognizes the table context
6865 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6866 ## depends on PHP's treatment of broken table markup!
6868 Implicit <td> after a |-
6870 parsoid=wt2html,html2html
6890 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6892 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6894 parsoid=wt2html,html2html
6927 <tr><td><pre>a</pre></td></tr>
6928 <tr><td> b</td></tr>
6933 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6934 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6936 Lists should be recognized in an implicit <td> context
6938 parsoid=wt2html,html2html
6965 Table cells not properly parsed in an implicit-td context
6969 {{table_attribs_4}} || a || b
6974 <td style="background-color:#DC241f;" width="10px"></td>
6981 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6982 <td style="background-color:#DC241f;" width="10px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["",{"template":{"target":{"wt":"table_attribs_4","href":"./Template:Table_attribs_4"},"params":{},"i":0}}," "]}'> </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> a </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> b</td></tr>
6987 Parsoid: Round-trip tables directly followed by content (bug 51219)
6989 parsoid=wt2html,wt2wt
7014 Parsoid: Default to a newline after tables in new content (bug 51219)
7019 <tr><td>foo</td></tr></tbody></table> bar
7021 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7026 <nowiki> </nowiki>bar
7034 Parsoid: newline inducing block nodes don't suppress <nowiki>
7046 Parsoid: Row-syntax table headings followed by comment & table cells
7048 parsoid=wt2html,wt2wt
7052 <!-- foo --> || baz || quux
7066 <tbody><tr><th> foo </th><th> bar
7067 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7072 Parsoid: Recover better from broken table attributes
7092 <p>foo</p></td></tr>
7097 Tables: Digest broken attributes on table and tr tag
7113 # T137406: Whitespace in the HTML
7115 1. Generate correct wikitext for tables with thead/tbody/tfoot
7120 <caption>Test</caption>
7161 <caption>Test</caption>
7181 # T137406: No whitespace in the HTML
7183 2. Generate correct wikitext for tables with thead/tbody/tfoot
7187 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7197 Testing serialization after deletion in references
7206 hi <ref><div id="x">ho</div></ref>
7216 Testing serialization after deletion of table cells
7219 "modes": ["wt2wt", "selser"],
7227 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7237 Testing selser after addition of new row before first row (T125419)
7240 "modes": ["wt2wt", "selser"],
7242 [ "tr", "before", "<tr><td>X</td></tr>" ]
7258 Serialize new table rows in a HTML table using HTML tags
7261 "modes": ["wt2wt", "selser"],
7263 [ "tr", "before", "<tr><td>X</td></tr>" ]
7267 <table><tr><td>a</td></tr></table>
7269 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7273 Serialize new table cells in a HTML row using HTML tags
7276 "modes": ["wt2wt", "selser"],
7278 [ "td", "before", "<td>X</td>" ]
7282 <table><tr><td>a</td></tr></table>
7284 <table><tr><td>X</td><td>a</td></tr></table>
7288 Wikitext tables can be nested inside HTML tables
7292 <table data-parsoid='{"stx":"html"}'>
7295 <tr><td>foo</td></tr>
7310 Serialize wikitext list items as HTML list items when embedded in a HTML list
7314 <ul data-parsoid='{"stx": "html"}'>
7315 <li data-parsoid='{}'>a</li>
7325 # SSS FIXME: Is this actually a good thing given the
7326 # odd nested list output that is generated by MW?
7327 # <ul><li>foo<ul>..</ul></li></ul> instead of
7328 # <ul><li>foo</li><ul>..</ul></ul>
7330 Wikitext lists can be nested inside HTML lists
7334 <ul data-parsoid='{"stx": "html"}'>
7335 <li data-parsoid='{"stx": "html"}'>a
7340 <ul data-parsoid='{"stx": "html"}'>
7363 Plain link, capitalized
7367 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7372 Plain link, uncapitalized
7376 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7383 [[Main Page|The Main Page]]
7385 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7390 Piped link with comment in link text
7392 [[Main Page|The Main<!--front--> Page]]
7394 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7399 Piped link with multiple pipe characters in link text
7401 [[Main Page||The|Main|Page|]]
7403 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7406 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7410 Piped link with no link text
7412 [[Thomas Bek (bishop of St David's)|]]
7414 <p>[[Thomas Bek (bishop of St David's)|]]
7417 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7425 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7430 Broken link with fragment
7432 [[Zigzagzogzagzig#zug]]
7434 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7439 Special page link with fragment
7441 [[Special:Version#anchor]]
7443 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7448 Nonexistent special page link with fragment
7450 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7452 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7459 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7461 <p>xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a>, xxx<a href="/wiki/Main_Page" title="Main Page">Main Page</a>, Xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a> XXX<a href="/wiki/Main_Page" title="Main Page">main Page</a>, XXX<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7468 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7470 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!!
7481 Bug 43661: Piped links with identical prefixes
7483 [[prefixed article|prefixed articles with spaces]]
7485 [[prefixed article|prefixed articlesaoeu]]
7487 [[Main Page|Main Page test]]
7489 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7490 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7491 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7497 Link with HTML entity in suffix / tail
7499 [[Main Page]]", [[Main Page]]a
7501 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7504 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&quot;","srcContent":"\""}'>"</span>, <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&#97;","srcContent":"a"}'>a</span></p>
7508 Link with 3 brackets
7519 Link with 4 brackets
7523 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7528 Piped link with 3 brackets
7530 [[[main page|the main page]]]
7532 <p>[[[main page|the main page]]]
7537 Piped link with extlink-like text
7540 [[Main Page|This is a [bar]]]
7542 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7543 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7546 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7547 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7551 Link with multiple pipes
7553 [[Main Page|The|Main|Page]]
7555 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7559 # Note that parsoid does not munge anchor text; all non-space
7560 # characters are valid in HTML5 ids.
7562 Anchor containing a #. (bug 63430)
7564 [[Main Page#And#Link]]
7566 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7569 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7575 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7577 <p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a>
7582 Link with space in namespace
7584 [[User talk:Foo bar]]
7586 <p><a href="/index.php?title=User_talk:Foo_bar&action=edit&redlink=1" class="new" title="User talk:Foo bar (page does not exist)">User talk:Foo bar</a>
7591 MemoryAlpha:AlphaTest
7593 This is an article in the MemoryAlpha namespace
7594 (which shadows the memoryalpha interwiki link).
7598 Namespace takes precedence over interwiki link (bug 51680)
7600 [[MemoryAlpha:AlphaTest]]
7602 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7606 # The previous test doesn't work correctly in html2*, due to not recognizing the
7607 # link as an internal one. This one checks for the correct behavior.
7609 Link to namespace preferred over interwiki with correct rel attribute
7611 parsoid=html2wt,html2html
7613 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7615 [[MemoryAlpha:AlphaTest]]
7619 Piped link to namespace
7621 [[Meta:Disclaimers|The disclaimers]]
7623 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7630 [[Usually caused by a typo (oops}]]
7632 <p>[[Usually caused by a typo (oops}]]
7639 Just a test of an article title containing a percent.
7643 Link containing % (not as a hex sequence)
7646 [[7% Solution|7%25 Solution]]
7648 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7649 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7652 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7653 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7656 # note that the parsoid HTML is identical to the previous test output,
7657 # so the previous test ensures that the html2wt mode will generate the
7658 # "not as a hex sequence" wikitext.
7660 Link containing % as a single hex sequence interpreted to char
7662 parsoid=wt2wt,wt2html,html2html
7665 [[7%25 Solution|7%25 Solution]]
7667 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7668 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7671 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7672 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7676 Link containing % as a double hex sequence interpreted to hex sequence
7680 <p>[[7%2525 Solution]]
7684 # note that parsoid does not munge anchor text; all non-space
7685 # characters are valid in HTML5 anchors.
7687 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7688 Example for such a section: == < ==
7690 [[%23%3c]][[%23%3e]]
7692 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7695 <p><a rel="mw:WikiLink" href="./Main_Page#%3C" title="Main Page">#<</a><a rel="mw:WikiLink" href="./Main_Page#%3E" title="Main Page">#></a></p>
7699 Link containing "<#" and ">#" as a hex sequences
7701 [[%3c%23]][[%3e%23]]
7703 <p>[[%3c%23]][[%3e%23]]
7708 Link containing an equals sign
7710 [[Special:BookSources/isbn=4-00-026157-6]]
7712 <p><a href="/wiki/Special:BookSources/isbn%3D4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a>
7715 <p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
7721 Just a test of an article title containing a tilde.
7724 # note that links containing signatures, like [[Foo~~~~]], are
7725 # massaged by the pre-save transform (PST) and so the tildes are never
7726 # seen by the parser.
7728 Link containing a tilde
7732 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7735 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7739 Link containing double-single-quotes '' (bug 4598)
7741 [[Lista d''e paise d''o munno]]
7743 <p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&action=edit&redlink=1" class="new" title="Lista d''e paise d''o munno (page does not exist)">Lista d''e paise d''o munno</a>
7746 <p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno" title="Lista d''e paise d''o munno">Lista d''e paise d''o munno</a></p>
7750 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7752 Some [[Link|pretty ''italics'' and stuff]]!
7754 <p>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!
7757 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7761 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7763 ''Some [[Link|pretty ''italics'' and stuff]]!''
7765 <p><i>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i>
7770 Link with double quotes in title part (literal) and alternate part (interpreted)
7772 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7776 [[''Pentecoste''|Pentecoste]]
7778 [[''Pentecoste''|''Pentecoste'']]
7780 <p><a href="/index.php?title=Special:Upload&wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
7781 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a>
7782 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a>
7783 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a>
7786 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Denys_Savchenko_''Pentecoste''.jpg"><img resource="./File:Denys_Savchenko_''Pentecoste''.jpg" src="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg" height="220" width="220"/></a></span></p>
7787 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7788 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7789 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7793 Broken image links with HTML captions (bug 39700)
7795 [[File:Nonexistent|<script></script>]]
7796 [[File:Nonexistent|100x100px|<script></script>]]
7797 [[File:Nonexistent|<]]
7798 [[File:Nonexistent|a<i>b</i>c]]
7800 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7801 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7802 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7803 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7806 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7807 <span typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7808 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7809 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span></p>
7815 [[http://www.example.com]]
7817 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7820 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7824 Plain link to URL with link text
7826 [[http://www.example.com Link text]]
7828 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7833 Plain link to protocol-relative URL
7835 [[//www.example.com]]
7837 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7840 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7844 Plain link to protocol-relative URL with link text
7846 [[//www.example.com Link text]]
7848 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7853 Plain link to page with question mark in title
7859 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7860 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7865 # I'm fairly sure the expected result here is wrong.
7866 # We want these to be URL links, not pseudo-pages with URLs for titles....
7867 # However the current output is also pretty screwy.
7870 # I'm changing it to match the current output--it arguably makes more
7871 # sense in the light of the test above. Old expected result was:
7872 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7874 # But I think this test is bordering on "garbage in, garbage out" anyway.
7879 Piped link to URL: [[http://www.example.com|an example URL]]
7881 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7884 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7888 BUG 2: [[page|http://url/]] should link to page, not http://url/
7890 [[Main Page|http://url/]]
7892 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7895 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7898 # Parsoid does not mark self-links, by design.
7900 BUG 337: Escaped self-links should be bold
7904 [[Bug462]] [[Bug462]]
7906 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7909 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7911 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7915 Self-link to section should not be bold
7919 [[Main Page#section]]
7921 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7932 Self-link to numeric title
7938 <p><strong class="selflink">0</strong>
7943 Link to numeric-equivalent title
7949 <p><a href="/wiki/00" title="00">00</a>
7954 <nowiki> inside a link
7956 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7958 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7963 Non-breaking spaces in title
7965 [[ Main Page ]]
7967 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7972 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7978 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7983 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7989 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7994 Internal link with en linktrail: no apostrophes (bug 27473)
8000 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8005 Internal link with ca linktrail with apostrophes (bug 27473)
8011 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8016 Internal link with kaa linktrail with apostrophes (bug 27473)
8022 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8027 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
8029 [[User:Foo/Test/63636:Bar|Test]]
8031 <p><a href="/index.php?title=User:Foo/Test/63636:Bar&action=edit&redlink=1" class="new" title="User:Foo/Test/63636:Bar (page does not exist)">Test</a>
8034 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8037 ## Mainly a sanity check for Parsoid
8039 Handle title parsing for subpages
8048 ## FIXME: Add a working php section here
8050 Link to a subpage from a namespace other than main
8056 <p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
8060 Ensure that transclusion titles are not url-decoded
8062 subpage title=[[Test]]
8065 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8067 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8070 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8074 Purely hash wikilink
8076 title=[[User:test/123]]
8080 <p><a href="#a">b</a>
8083 <p><a rel="mw:WikiLink" href="./User:Test/123#a" data-parsoid='{"stx":"piped","a":{"href":"./User:Test/123#a"},"sa":{"href":"#a"}}'>b</a></p>
8087 1. Interaction of linktrail and template encapsulation
8093 <p><a rel="mw:WikiLink" href="Foo" title="Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo]]"}},"i":0}},"l"]}'>Fool</a></p>
8097 2. Interaction of linktrail and template encapsulation
8101 {{echo|Some [[Fool]]}}s
8103 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]"}},"i":0}},"s"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some </span><a rel="mw:WikiLink" href="./Fool" title="Fool" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a></p>
8107 3. Interaction of linktrail and template encapsulation
8111 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8113 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]s are '''bold and foolish'''"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some <a rel="mw:WikiLink" href="./Fool" title="Fool" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a> are <b>bold and foolish</b></p>
8123 Internal link with is link prefix
8127 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8129 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8140 Internal link with is link trail and link prefix
8144 [[mótmælendatrú|xxx]]ar
8146 mótmælenda[[söfnuður]]
8147 mótmælenda[[söfnuður|söfnuðir]]
8148 mótmælenda[[söfnuður|söfnuðir]]xxx
8150 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8151 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8152 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8153 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8154 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8159 Parsoid link trail escaping
8161 parsoid=html2wt,html2html
8163 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
8169 Parsoid link prefix escaping
8172 parsoid=html2wt,html2html
8174 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
8176 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8180 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8188 [http://wp.org ''foo'']
8190 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8191 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8192 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8193 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8198 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8202 [[Foo|{{echo|a}} b {{echo|c}}]]
8204 <p><a rel="mw:WikiLink" href="Foo" title="Foo"><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span> b <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c"}},"i":0}}]}'>c</span></a></p>
8208 Link with angle bracket after anchor
8212 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8215 <p><a rel="mw:WikiLink" href="./Foo#%3Cbar%3E" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#%3Cbar%3E"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
8219 ### Interwiki links (see maintenance/interwiki.sql)
8223 Inline interwiki link
8225 parsoid=wt2html,wt2wt,html2html
8227 [[MeatBall:SoftSecurity]]
8229 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8232 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8236 Inline interwiki link with empty title (bug 2372)
8238 parsoid=wt2html,wt2wt,html2html
8242 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8245 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8249 Interwiki link encoding conversion (bug 1636)
8251 *[[Wikipedia:ro:Olteniţa]]
8252 *[[Wikipedia:ro:Olteniţa]]
8254 <ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8255 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li></ul>
8259 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8260 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8265 Interwiki link with fragment (bug 2130)
8267 [[MeatBall:SoftSecurity#foo]]
8269 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8273 # Ideally the wikipedia: prefix here should be proto-relative too
8274 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8275 # define the 'en' prefix, and originally the test used 'wikipedia',
8276 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8279 Different interwiki prefixes mapping to the same URL
8287 [[:wikipedia:Foo|Foo]]
8289 [[wikipedia:en:Foo]]
8291 [[:wikipedia:en:Foo]]
8295 <p><a rel="mw:ExtLink" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">en:Foo</a></p>
8297 <p><a rel="mw:ExtLink" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">Foo</a></p>
8299 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">wikipedia:Foo</a></p>
8301 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">Foo</a></p>
8303 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8305 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8307 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":" wikiPEdia :Foo"},"isIW":true}' title="wikipedia:Foo"> wikiPEdia :Foo</a></p>
8311 Interwiki links that cannot be represented in wiki syntax
8314 [[meatball:ok#foo|ok with fragment]]
8315 [[meatball:ok_as_well?|ok ending with ? mark]]
8316 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8317 [http://de.wikipedia.org/wiki/#foo is just fragment]
8320 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8321 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8322 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" class="extiw" title="meatball:ok as well?">ok ending with ? mark</a>
8323 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8324 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8327 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8328 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8329 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
8330 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8331 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8335 Interwiki links: trail
8337 [[wikipedia:Foo|Ba]]r
8339 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8342 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}' title="wikipedia:Foo">Bar</a></p>
8346 Local interwiki link
8348 parsoid=wt2html,wt2wt,html2html
8350 [[local:Template:Foo]]
8352 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8355 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8358 # Parsoid does not mark self-links, by design.
8360 Local interwiki link: self-link to current page
8363 parsoid=wt2html,wt2wt,html2html
8367 <p><strong class="selflink">local:Main Page</strong>
8370 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8374 Local interwiki link: prefix only (bug 64167)
8376 parsoid=wt2html,wt2wt,html2html
8380 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8383 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8387 Local interwiki link: with additional interwiki prefix (bug 61357)
8389 parsoid=wt2html,wt2wt,html2html
8391 [[local:meatball:Hello]]
8393 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8396 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8400 Multiple local interwiki link prefixes
8402 [[local:local:local:local:mi:local:Foo]]
8404 parsoid=wt2html,wt2wt,html2html
8406 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8409 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8413 ### Interlanguage links
8414 ### Language links (so that searching for '### language' matches..)
8426 <p>Blah blah blah</p>
8427 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8430 ## parsoid html2wt will lose the space variations
8432 Interlanguage link with spacing
8434 parsoid=wt2html,wt2wt,html2html
8442 <p>Blah blah blah</p>
8443 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8447 Double interlanguage link
8456 <p>Blah blah blah</p>
8457 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8458 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8461 ## parsoid html2wt will lose the space variations
8463 Interlanguage link variations
8465 parsoid=wt2html,wt2wt,html2html
8475 <p>Blah blah blah</p>
8476 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8477 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8478 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8481 ## parsoid html2wt will normalize the space to _
8483 Space and question mark encoding in interlanguage links (T95473)
8485 parsoid=wt2html,wt2wt,html2html
8493 <p>Blah blah blah</p>
8494 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8498 Interlanguage link, with prefix links
8508 <p>Blah blah blah</p>
8509 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8513 Double interlanguage link, with prefix links (bug 8897)
8524 <p>Blah blah blah</p>
8525 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8526 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8530 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8538 <p>Blah blah blah</p>
8539 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8542 ## PHP parser tests script needs an update
8543 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8545 Language links render as inline links if $wgInterwikiMagic=false
8547 wgInterwikiMagic=false
8548 parsoid=wt2html,wt2wt,html2html
8553 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8556 ## PHP parser tests script needs an update
8557 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8559 Language links render as inline links in the Talk namespace
8562 parsoid=wt2html,wt2wt,html2html
8567 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8571 Parsoid-specific test: Wikilinks with should RT properly
8577 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8582 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8584 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8586 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8587 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8589 He&nbsp;llo [[Foo|He&nbsp;llo]]
8591 He&nbsp;llo He&nbsp;llo
8593 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8594 </p><p>He&nbsp;llo He&nbsp;llo
8598 # html2wt will fail because of title normalization without data-parsoid
8600 Parsoid: handle constructor well
8602 parsoid=wt2html,wt2wt
8608 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8609 </p><p><a href="/index.php?title=Constructor:foo&action=edit&redlink=1" class="new" title="Constructor:foo (page does not exist)">constructor:foo</a>
8612 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8614 <p><a rel="mw:WikiLink" href="./Constructor:foo" title="Constructor:foo" data-parsoid='{"stx":"simple","a":{"href":"./Constructor:foo"},"sa":{"href":"constructor:foo"}}'>constructor:foo</a></p>
8623 # Note that `ko` isn't a known interlanguage prefix
8625 Parsoid: recognize interlanguage links without a target page
8635 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8637 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8640 # Note that `ko` isn't a known interwiki prefix
8642 Parsoid: recognize interwiki links without a target page
8644 parsoid=wt2html,wt2wt,html2html
8650 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8651 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8654 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8655 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8659 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8663 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8666 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8670 Interlanguage link with preceding local interwiki link (bug 68085)
8672 parsoid=wt2html,wt2wt,html2html
8675 [[local:es:Spanish]]
8678 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8682 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8686 Looks like an interlanguage link, but is actually a local interwiki
8688 parsoid=wt2html,wt2wt,html2html
8694 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8698 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8702 ### Redirects, Parsoid-only
8706 1. Simple redirect to page
8708 #REDIRECT [[Main Page]]
8710 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8714 2. Other redirect variants
8716 #REDIRECT [[Main_Page]]
8718 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8721 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8722 # This tests the Parsoid bail-out code.
8724 3. Other redirect variants
8726 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8728 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8732 4. Redirect to a templated destination
8734 #REDIRECT [[{{echo|Foo}}bar]]
8736 <link about="#mwt2" typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-parsoid='{"a":{"href":"./Foobar"},"sa":{"href":"{{echo|Foo}}bar"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span>bar"}]]}'/>
8742 parsoid=wt2html,wt2wt
8747 <li>REDIRECT [[]]</li></ol>
8751 Optional colon in #REDIRECT
8753 # the colon is archaic syntax. we support it for wt2html, but we
8754 # don't care that it roundtrips back to the modern syntax.
8755 parsoid=wt2html,html2html
8757 #REDIRECT:[[Main Page]]
8759 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8763 Whitespace in #REDIRECT with optional colon
8765 # the colon and gratuitous whitespace is archaic syntax. we support
8766 # it for wt2html, but we don't care that it roundtrips back to the
8767 # modern syntax (without extra whitespace)
8768 parsoid=wt2html,html2html
8775 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8779 Piped link in #REDIRECT
8781 # content after piped link is ignored. we support this syntax,
8782 # but don't care that the piped link is lost when we roundtrip this.
8785 #REDIRECT [[Main Page|bar]]
8787 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8791 Redirect to category (T104502)
8793 parsoid=wt2html,wt2wt
8795 #REDIRECT [[Category:Foo]]
8797 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8801 Redirect to category with URL encoding (T104502)
8805 #REDIRECT [[Category%3AFoo]]
8807 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8811 Redirect to category page
8813 #REDIRECT [[:Category:Foo]]
8815 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8819 Redirect to image page (1)
8821 #REDIRECT [[File:Wiki.png]]
8823 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8827 Redirect to image page (2)
8829 #REDIRECT [[Image:Wiki.png]]
8831 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8834 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8835 # Next test confirms this.
8837 Redirect to language (1) (T104918)
8839 parsoid=wt2html,wt2wt,html2html
8841 #REDIRECT [[en:File:Wiki.png]]
8843 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8847 Redirect to language (2) (T104918)
8849 #REDIRECT [[:en:File:Wiki.png]]
8851 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8855 Redirect to interwiki (T104918)
8857 #REDIRECT [[meatball:File:Wiki.png]]
8859 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8863 Non-English #REDIRECT
8867 #TILVÍSUN [[Main Page]]
8869 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8873 Redirect syntax under text isn't considered a redirect
8876 #redirect [[Main Page]]
8879 <ol data-parsoid='{}'><li data-parsoid='{}'>redirect <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'>Main Page</a></li></ol>
8882 # FIXME: Should hoist the redirect to the top of the page and ensure there
8889 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8909 Broken br tag sanitization
8917 # TODO: Fix html2html mode (bug 51055)!
8919 Parsoid: Broken br tag recognition
8932 Incorrecly removing closing slashes from correctly formed XHTML
8934 <br style="clear:both;" />
8936 <p><br style="clear:both;" />
8941 Failing to transform badly formed HTML into correct XHTML
8943 <br style="clear: left;">
8944 <br style="clear: right;">
8945 <br style="clear: both;">
8947 <p><br style="clear: left;" />
8948 <br style="clear: right;" />
8949 <br style="clear: both;" />
8953 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8954 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8956 Handling html with a div self-closing tag
8965 <p><div title />
8969 <p><div title=bar />
8970 <div title=bar/>
8972 <div title="bar/"></div>
8976 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8977 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8978 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8979 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8980 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8981 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8985 Handling html with a br self-closing tag
9012 Horizontal ruler (should it add that extra space?)
9027 Horizontal ruler -- 4+ dashes render hr
9036 Horizontal ruler -- eats additional dashes on the same line
9045 Horizontal ruler -- does not collapse dashes on consecutive lines
9056 Horizontal ruler -- <4 dashes render as plain text
9065 Horizontal ruler -- Supports content following dashes on same line
9077 ### Block-level elements
9086 <ul><li>Common list</li>
9088 <li>item 3</li></ul>
9099 <ol><li>Numbered list</li>
9101 <li> item 3</li></ol>
9115 ***#Number on level 4
9117 **#Number on level 3
9118 **#Number on level 3
9122 #** Level 3, but ordered
9125 <ol><li> with numbers</li></ol>
9126 <ul><li> and bullets</li></ul>
9127 <ol><li> and numbers</li></ol></li>
9129 <ul><li>bullet level 2
9130 <ul><li>bullet level 3
9131 <ol><li>Number on level 4</li></ol></li></ul></li>
9133 <ol><li>Number on level 3</li>
9134 <li>Number on level 3</li></ol></li></ul>
9135 <ol><li>number level 2</li></ol></li>
9137 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9138 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9143 1. Nested mixed wikitext and html list
9146 * <ul><li>ho</li></ul>
9151 <li> <ul><li>ho</li></ul></li>
9153 <ul><li> ho</li></ul></li></ul>
9157 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9159 <ul><li> ho</li></ul></li></ul>
9163 2. Nested mixed wikitext and html list (incompatible)
9166 : {{echo|<li>ho</li>}}
9169 <dd> <li>ho</li></dd></dl>
9173 <dd> <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>ho</li>"}},"i":0}}]}'>ho</li></dd></dl>
9183 <ul><li>bar</li></ul></li></ul>
9193 <ul><li><ul><li>foo</li></ul></li>
9199 Nested lists 3 (first element empty)
9205 <ul><li>bar</li></ul></li></ul>
9210 Nested lists 4 (first element empty)
9215 <ul><li><ul><li></li></ul></li>
9221 Nested lists 5 (both elements empty)
9226 <ul><li><ul><li></li></ul></li>
9232 Nested lists 6 (both elements empty)
9238 <ul><li></li></ul></li></ul>
9243 Nested lists 7 (skip initial nesting levels)
9247 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9252 Nested lists 8 (multiple nesting transitions)
9260 <ul><li><ul><li> bar</li></ul></li>
9261 <li> baz</li></ul></li>
9267 Nested lists 9 (extension interaction)
9273 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9277 1. Lists with start-of-line-transparent tokens before bullets: Comments
9290 2. Lists with start-of-line-transparent tokens before bullets: Template close
9295 <ul><li>foo bar</li>
9301 List items are not parsed correctly following a <pre> block (bug 785)
9307 <ul><li> <pre>foo</pre></li>
9308 <li> <pre>bar</pre></li>
9312 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9313 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9318 List items from template
9329 * notSOL{{inner list}}
9332 <ul><li> item 1</li>
9333 <li> item 2</li></ul>
9334 <ul><li> item 0</li>
9336 <li> item 2</li></ul>
9337 <ul><li> item 0</li>
9340 <li> item 2</li></ul>
9345 List interrupted by empty line or heading
9353 <ul><li> foo</li></ul>
9354 <ul><li><ul><li> bar</li></ul></li></ul>
9355 <h2><span class="mw-headline" id="A_heading">A heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
9356 <ul><li> Another list item</li></ul>
9361 Multiple list tags generated by templates
9382 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9385 <!--This line will NOT split the list-->
9387 <!--This line will NOT split the list either-->
9389 <!--foo--> <!----> <!--This line NOT split the list either-->
9400 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9403 <!--This line will NOT split the list-->
9405 <!--This line will NOT split the list either-->
9407 <!--foo--> <!----> <!--This line NOT split the list
9420 (The PHP parser relies on Tidy for the hack)
9422 parsoid=wt2html,wt2wt
9426 * {{echo|<li>templated li-hack}}
9427 * <!--foo--> <li> unsupported li-hack with preceding comments
9430 <li><li>not a li-hack
9437 <li>templated li-hack</li>
9438 <li>unsupported li-hack with preceding comments</li>
9441 <li>not a li-hack</li>
9446 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9473 Parsoid: Test of whitespace serialization with Templated bullets
9480 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9484 # ------------------------------------------------------------------------
9485 # The next set of tests are about Parsoid's ability to handle badly nested
9486 # tags (parse, minimize scope of fixup, and roundtrip back)
9487 # ------------------------------------------------------------------------
9490 Unbalanced closing block tags break a list
9491 (php parser relies on Tidy to fix up)
9509 # Parsoid fails this test, but it might be tricky to support properly.
9512 Unbalanced closing non-block tags don't break a list
9513 (php parser relies on Tidy to fix up)
9520 <li><span>a</span></li>
9521 <li><span>b</span></li>
9535 Unclosed formatting tags that straddle lists are closed and reopened
9536 (php parser relies on Tidy to fix up)
9538 parsoid=wt2html,wt2wt,html2html
9548 <ol><li> <s> a</s></li>
9549 <li><s> b </s></li></ol>
9554 1. List embedded in a formatting tag
9561 <li><small>foo</small></li>
9571 ## Ugly Parsoid output here
9572 ## Not sure what the right output is.
9574 2. List embedded in a formatting tag
9581 <li><small>a</small></li>
9582 <li><small>b</small></li>
9589 <li><small>b</small></li>
9593 # Ugly Parsoid and PHP parser output here
9594 # Not sure if we want to make this a test!
9597 ## 3. Unclosed formatting tags in list elements
9603 ## <li><small>a</small></li>
9604 ## <li><small><small>b</small></small></li>
9608 ## <li><small>a</small></li>
9610 ## <li><small>b</small></li>
9614 # This is a bug in the PHP parser + tidy combination.
9615 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9616 # and then fostered out of the table by tidy.)
9617 # We believe the Parsoid output to be correct.
9619 Table with missing opening <tr> tag
9621 parsoid=wt2html,wt2wt
9639 # Note that the current date is hard-coded as
9640 # 1970-01-01T00:02:03Z (a Thursday)
9641 # when running parser tests. The timezone is also fixed to GMT, so
9642 # local date will be identical to current date.
9645 Magic Word: {{CURRENTDAY}}
9654 Magic Word: {{CURRENTDAY2}}
9663 Magic Word: {{CURRENTDAYNAME}}
9672 Magic Word: {{CURRENTDOW}}
9681 Magic Word: {{CURRENTMONTH}}
9690 Magic Word: {{CURRENTMONTH1}}
9699 Magic Word: {{CURRENTMONTHABBREV}}
9701 {{CURRENTMONTHABBREV}}
9708 Magic Word: {{CURRENTMONTHNAME}}
9710 {{CURRENTMONTHNAME}}
9717 Magic Word: {{CURRENTMONTHNAMEGEN}}
9719 {{CURRENTMONTHNAMEGEN}}
9726 Magic Word: {{CURRENTTIME}}
9735 Magic Word: {{CURRENTHOUR}}
9744 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9753 Magic Word: {{CURRENTYEAR}}
9762 Magic Word: {{CURRENTTIMESTAMP}}
9764 {{CURRENTTIMESTAMP}}
9771 Magic Words LOCAL (UTC)
9775 * {{LOCALMONTHNAME}}
9776 * {{LOCALMONTHNAMEGEN}}
9777 * {{LOCALMONTHABBREV}}
9786 * {{LOCALTIMESTAMP}}
9801 <li> 19700101000203</li></ul>
9806 Magic Word: {{FULLPAGENAME}}
9808 title=[[User:Ævar Arnfjörð Bjarmason]]
9812 <p>User:Ævar Arnfjörð Bjarmason
9817 Magic Word: {{FULLPAGENAMEE}}
9819 title=[[User:Ævar Arnfjörð Bjarmason]]
9823 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9828 Magic Word: {{TALKSPACE}}
9830 title=[[User:Ævar Arnfjörð Bjarmason]]
9839 Magic Word: {{TALKSPACE}}, same namespace
9841 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9850 Magic Word: {{TALKSPACE}}, main namespace
9852 title=[[Parser Test]]
9861 Magic Word: {{TALKSPACEE}}
9863 title=[[User:Ævar Arnfjörð Bjarmason]]
9872 Magic Word: {{SUBJECTSPACE}}
9874 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9883 Magic Word: {{SUBJECTSPACE}}, same namespace
9885 title=[[User:Ævar Arnfjörð Bjarmason]]
9894 Magic Word: {{SUBJECTSPACE}}, main namespace
9896 title=[[Parser Test]]
9904 Magic Word: {{SUBJECTSPACEE}}
9906 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9915 Magic Word: {{NAMESPACE}}
9917 title=[[User:Ævar Arnfjörð Bjarmason]]
9926 Magic Word: {{NAMESPACEE}}
9928 title=[[User:Ævar Arnfjörð Bjarmason]]
9937 Magic Word: {{NAMESPACENUMBER}}
9939 title=[[User:Ævar Arnfjörð Bjarmason]]
9948 Magic Word: {{SUBPAGENAME}}
9950 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9959 Magic Word: {{SUBPAGENAMEE}}
9961 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9970 Magic Word: {{ROOTPAGENAME}}
9972 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9976 <p>Ævar Arnfjörð Bjarmason
9981 Magic Word: {{ROOTPAGENAMEE}}
9983 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9987 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9992 Magic Word: {{BASEPAGENAME}}
9994 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9998 <p>Ævar Arnfjörð Bjarmason
10003 Magic Word: {{BASEPAGENAMEE}}
10005 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10009 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10014 Magic Word: {{TALKPAGENAME}}
10016 title=[[User:Ævar Arnfjörð Bjarmason]]
10020 <p>User talk:Ævar Arnfjörð Bjarmason
10025 Magic Word: {{TALKPAGENAMEE}}
10027 title=[[User:Ævar Arnfjörð Bjarmason]]
10031 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10036 Magic Word: {{SUBJECTPAGENAME}}
10038 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10040 {{SUBJECTPAGENAME}}
10042 <p>User:Ævar Arnfjörð Bjarmason
10047 Magic Word: {{SUBJECTPAGENAMEE}}
10049 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10051 {{SUBJECTPAGENAMEE}}
10053 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10058 Magic Word: {{NUMBEROFFILES}}
10067 Magic Word: {{PAGENAME}}
10069 title=[[User:Ævar Arnfjörð Bjarmason]]
10073 <p>Ævar Arnfjörð Bjarmason
10078 Magic Word: {{PAGENAME}} with metacharacters
10080 title=[['foo & bar = baz']]
10084 <p><i>'foo & bar = baz'</i>
10087 <p><i>'foo & bar = baz'</i></p>
10091 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10093 title=[[*RFC 1234 http://example.com/]]
10097 <p>*RFC 1234 http://example.com/
10100 <p>*RFC 1234 http://example.com/</p>
10104 Magic Word: {{PAGENAMEE}}
10106 title=[[User:Ævar Arnfjörð Bjarmason]]
10110 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10115 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10117 title=[[*RFC 1234 http://example.com/]]
10121 <p>*RFC_1234_http://example.com/
10124 <p>*RFC_1234_http://example.com/</p>
10128 Magic Word: {{REVISIONID}}
10137 Magic Word: {{SCRIPTPATH}}
10145 Magic Word: {{STYLEPATH}}
10154 Magic Word: {{SERVER}}
10158 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10163 Magic Word: {{SERVERNAME}}
10172 Magic Word: {{SITENAME}}
10181 Case-sensitive magic words, when cased differently, should just be template transclusions
10188 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10189 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10190 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10191 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10196 Case-insensitive magic words should still work with weird casing.
10206 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10210 # From plwiki:PLOS_ONE
10212 Parsoid: Page property magic word with magic word contents
10214 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10216 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main Page</span></i>"}]]}'/>
10220 Parsoid: Template-generated DISPLAYTITLE
10222 {{{{echo|DISPLAYTITLE}}:Foo}}
10224 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DISPLAYTITLE}}:Foo"},"params":{},"i":0}}]}'/>
10228 Namespace 1 {{ns:1}}
10237 Namespace 1 {{ns:01}}
10246 Namespace 0 {{ns:0}} (bug 4783)
10254 Namespace 0 {{ns:00}} (bug 4783)
10262 Namespace -1 {{ns:-1}}
10271 Namespace User {{ns:User}}
10280 Namespace User talk {{ns:User_talk}}
10289 Namespace User talk {{ns:uSeR tAlK}}
10298 Namespace File {{ns:File}}
10307 Namespace File {{ns:Image}}
10316 Namespace (lang=de) Benutzer {{ns:User}}
10327 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10333 <p>Benutzer Diskussion
10341 {{urlencode:hi world?!}}
10342 {{urlencode:hi world?!|WIKI}}
10343 {{urlencode:hi world?!|PATH}}
10344 {{urlencode:hi world?!|QUERY}}
10354 Magic Word: prioritize type info over data-parsoid
10358 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10364 Magic Word: serialize on separate line (parsoid)
10366 parsoid=wt2wt,html2wt
10372 foo<meta property="mw:PageProp/notoc"/>bar
10376 Magic Word: rt non-english wikis
10383 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10387 __proto__ is treated as normal wikitext (T105997)
10399 Magic links: internal link to RFC (bug 479)
10403 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10406 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10410 Magic links: RFC (bug 479)
10414 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10417 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10421 Magic links: RFC (bug 65278)
10423 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10425 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
10428 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10432 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10434 RFC      822
10438 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10443 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
10449 Magic links: ISBN (bug 1937)
10453 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10456 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10460 Magic links: ISBN (bug 65278)
10462 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10464 <p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10467 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
10471 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10473 ISBN      978 0 316 09811 3
10479 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10486 <p><a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 978<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>0<span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>316<span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span>09811<span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>3</a>
10494 Magic links: PMID incorrectly converts space to underscore
10498 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10501 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10505 Magic links: PMID (bug 65278)
10507 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10509 <p>This is <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.
10512 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
10516 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10518 PMID      1234
10522 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10527 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 1234</a>
10532 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10533 # since these are ExtLinkText, not MagicLinkText
10535 Magic links: use appropriate serialization for "almost" magic links.
10537 X[[Special:BookSources/0978739256|foo]]
10539 X[//tools.ietf.org/html/rfc1234 foo]
10541 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10542 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10545 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10546 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10550 Magic links: All disabled (T47942)
10552 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10558 <p>ISBN 0-306-40615-2
10569 Nonexistent template
10571 {{thistemplatedoesnotexist}}
10573 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10578 Template with invalid target containing tags
10580 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10582 <p>{{a<b>b</b>|foo|a=b|a = b}}
10587 Template with invalid target containing unclosed tag
10589 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10591 <p>{{a<b>|foo|a=b|a = b}}</b>
10596 Template with invalid target containing wikilink
10600 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10603 <p><span typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"[[Main Page]]"},"params":{},"i":0}}]}'>{{</span><a rel="mw:WikiLink" href="./Main_Page" about="#mwt1">Main Page</a><span about="#mwt1">}}</span></p>
10607 Template with just whitespace in it, bug #68421
10611 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</p>
10617 This is a test template
10625 <p>This is a test template
10630 Template with explicit namespace
10634 <p>This is a test template
10642 This is a test template with parameter {{{param}}}
10648 {{paramtest|param=foo}}
10650 <p>This is a test template with parameter foo
10655 Template:paramtestnum
10657 [[{{{1}}}|{{{2}}}]]
10661 Template unnamed parameter
10663 {{paramtestnum|Main Page|the main page}}
10665 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10670 Template:templatesimple
10676 Template:templateredirect
10678 #redirect [[Template:templatesimple]]
10682 Template:templateasargtestnum
10688 Template:templateasargtest
10690 {{template{{{templ}}}}}
10694 Template:templateasargtest2
10700 Template with template name as unnamed argument
10702 {{templateasargtestnum|templatesimple}}
10709 Template with template name as argument
10711 {{templateasargtest|templ=simple}}
10718 Template with template name as argument (2)
10720 {{templateasargtest2|templ=templatesimple}}
10727 Template:templateasargtestdefault
10729 {{{{{templ|templatesimple}}}}}
10739 Template with default value
10741 {{templateasargtestdefault}}
10748 Template with default value (value set)
10750 {{templateasargtestdefault|templ=templa}}
10759 {{templateredirect}}
10764 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10768 Template with argument in separate line
10770 {{ templateasargtest |
10778 Template with complex template as argument
10781 param ={{ templateasargtest |
10782 templ = simple }}}}
10784 <p>This is a test template with parameter (test)
10789 Template with thumb image (with link in description)
10791 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10793 This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
10796 <p>This is a test template with parameter</p>
10797 <div class="thumb tright">
10798 <div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a>
10799 <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div>
10803 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
10807 Template:complextemplate
10809 {{{1}}} {{paramtest|
10810 param ={{{param}}}}}
10814 Template with complex arguments
10817 param ={{ templateasargtest |
10818 templ = simple }}|[[Template:complextemplate|link]]}}
10820 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10825 BUG 553: link with two variables in a piped link
10828 |[[{{{1}}}|{{{2}}}]]
10833 <td>[[{{{1}}}|{{{2}}}]]
10838 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-parsoid='{"src":"{{{1}}}"}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-parsoid='{"src":"{{{2}}}"}'>{{{2}}}</span>]]</td></tr>
10843 Abort table cell attribute parsing on wikilink
10846 | testing [[one|two]] | three || four
10847 | testing one two | three || four
10848 | testing="[[one|two]]" | three || four
10853 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10859 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10865 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
10866 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'> three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
10867 <td> testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td></tr>
10872 Don't abort table cell attribute parsing if wikilink is found in template arg
10875 | Test {{#tag:ref|One two "[[three]]" four}}
10879 <tbody><tr><td> Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:ref","function":"#tag"},"params":{"1":{"wt":"One two \"[[three]]\" four"}},"i":0}}]}'>One two "<a rel="mw:WikiLink" href="./Three" title="Three">three</a>" four</ref></td></tr>
10884 Magic variable as template parameter
10886 {{paramtest|param={{SITENAME}}}}
10888 <p>This is a test template with parameter MediaWiki
10895 [[{{{param}}}|link]]
10899 Template parameter as link source
10901 {{linktest|param=Main Page}}
10903 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10908 Template:paramtest2
10910 including another template, {{paramtest|param={{{arg}}}}}
10914 Template passing argument to another template
10916 {{paramtest2|arg='hmm'}}
10918 <p>including another template, This is a test template with parameter 'hmm'
10929 Template as link source
10933 [[{{linktest2}}|Main Page]]
10935 [[{{linktest2}}]]Page
10937 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10938 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10939 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10957 Template infinite loop
10961 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10966 Template from main namespace
10985 BUG 529: Template with table, not included at beginning of line
11004 BUG 523: Template shouldn't eat newline (or add an extra one before table)
11024 BUG 41: Template parameters shown as broken links
11033 Template with targets containing wikilinks
11037 {{[[{{echo|foo}}]]}}
11039 {{{{echo|[[foo}}]]}}
11041 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11042 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11054 Templates: Double quotes as template target
11061 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11065 ## This test is about making sure Parsoid's data-mw is well formed in the
11066 ## face of multiple templates with intersecting and overlapping ranges. The
11067 ## wikitext itself is wretched.
11069 Templates with intersecting and overlapping ranges
11094 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ha</p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ho</p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11096 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11098 <tbody><tr><td>hi</td></tr>
11103 Template:MSGNW test
11105 ''None'' of '''this''' should be
11107 but rather passed unmodified
11115 # hmm, fix this or just deprecate msgnw and document its behavior?
11119 {{msgnw:MSGNW test}}
11121 <p>''None'' of '''this''' should be
11123  but rather passed unmodified
11124 {{test}}
11128 <!-- comment -->
11135 {{int:youhavenewmessages|lots of money|not!}}
11137 <p>You have lots of money (not!).
11142 int keyword - non-existing message
11153 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11157 <includeonly> and <noinclude> being included
11168 <onlyinclude>Foo</onlyinclude>bar
11172 <onlyinclude> being included
11184 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11188 <onlyinclude> and <includeonly> being included
11197 <includeonly> and <noinclude> on a page
11199 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11206 Un-closed <noinclude>
11213 <onlyinclude> on a page
11215 <onlyinclude>Foo</onlyinclude>bar
11222 Un-closed <onlyinclude>
11229 Self-closed noinclude, includeonly, onlyinclude tags
11240 Unbalanced includeonly and noinclude tags
11244 |b</noinclude></noinclude>
11245 |c</noinclude></includeonly>
11246 |d</includeonly></includeonly>
11255 <td>c</includeonly>
11257 <td>d</includeonly></includeonly>
11263 Template:Includeonly section
11266 ==Includeonly section==
11272 Bug 6563: Edit link generation for section shown by <includeonly>
11274 {{includeonly section}}
11276 <h2><span class="mw-headline" id="Includeonly_section">Includeonly section</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-1" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
11277 <h2><span class="mw-headline" id="Section_T-1">Section T-1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-2" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
11281 # Uses same input as the contents of [[Template:Includeonly section]]
11283 Bug 6563: Section extraction for section shown by <includeonly>
11288 ==Includeonly section==
11296 Bug 6563: Edit link generation for section suppressed by <includeonly>
11299 ==Includeonly section==
11303 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
11308 Bug 6563: Section extraction for section suppressed by <includeonly>
11313 ==Includeonly section==
11321 Un-closed <includeonly>
11326 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11329 ## We used to, but no longer wt2wt this test since the default serializer
11330 ## will normalize the include directives to serialize on their own line.
11331 ## Selser will take care of preserving formatting in scenarios where they
11332 ## intermingled with other wikitext.
11334 Includes and comments at SOL
11336 parsoid=wt2html,html2html
11338 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11342 </noinclude>* stuff
11345 <includeonly>can have stuff</includeonly>=== here ===
11348 <h2><span class="mw-headline" id="hu">hu</span></h2>
11351 <ul><li> stuff</li>
11352 <li> here</li></ul>
11353 <h3><span class="mw-headline" id="here">here</span></h3>
11356 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2> hu </h2>
11358 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11360 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11361 <li> here</li></ul>
11363 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3> here </h3>
11367 # TODO: test with DOM fragment reuse!
11369 Parsoid: DOM fragment reuse
11371 parsoid=wt2wt,wt2html
11373 a{{echo|b<table></table>c}}d
11385 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b<table></table>c"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
11387 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b\n<table></table>\nc"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><span about="#mwt2">
11388 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11389 </span><p about="#mwt2">cd</p>
11391 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n\n<table></table>\n\nb"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>a</p><span about="#mwt3">
11393 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11395 </span><p about="#mwt3">b</p>
11399 Parsoid: Merge double tds (T52603)
11404 |{{echo|{{!}} foo}}
11408 <tr><td about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":0}}]}'> foo</td></tr>
11413 Parsoid: Merge double tds in nested transclusion content (T52603)
11419 |{{echo|{{!}} foo}}
11423 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\n{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":1}},"\n|}\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}'>
11425 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11431 ### <includeonly> and <noinclude> in attributes
11434 0. includeonly around the entire attribute
11436 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11438 <p><span id="v2">bar</span>
11443 1. includeonly in html attr key
11445 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11447 <p><span id="foo">bar</span>
11452 2. includeonly in html attr value
11454 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11455 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11457 <p><span id="v1">bar</span>
11458 <span id="v1">bar</span>
11463 3. includeonly in part of an attr value
11465 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11467 <p><span style="color:red;">bar</span>
11472 4. includeonly in table attributes
11496 ### Token Stream Patcher tests
11498 ### These tests won't always pass wt2wt and other modes because
11499 ### on serialization, the table will be output on a new line.
11500 ### For now, we are blacklisting them, and using this to test selser.
11504 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11506 parsoid=wt2html,wt2wt
11508 {{echo|}}{| width = '100%'
11512 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11513 <tbody><tr><td>foo</td></tr>
11517 ## We used to, but no longer wt2wt this test since the default serializer
11518 ## will normalize the include directives to serialize on their own line.
11519 ## Selser will take care of preserving formatting in scenarios where they
11520 ## intermingled with other wikitext.
11522 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11526 <includeonly>a</includeonly>{| {{{b}}}
11530 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"dsr\":[31,38,null,null],\"src\":\"{{{b}}}\"}'>{{{b}}}</span>"},{"html":""}]]}'>
11531 <tbody><tr><td>c</td></tr>
11536 Table wikitext syntax outside wiki-tables
11540 ! not a table heading
11543 | class="foo bar" | baz
11551 ! not a table heading
11554 | class="foo bar" | baz
11563 ### Testing parsing of templates where a template arg
11564 ### has the same name as the template itself.
11570 {{{quote|{{{1}}}}}}
11574 Templates: Template Name/Arg clash: 1. Use of positional param
11583 Templates: Template Name/Arg clash: 2. Use of named param
11585 {{quote|quote=foo}}
11592 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11601 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11605 Templates: 1. Simple use
11614 Templates: 2. Inside a block tag
11616 <div>{{echo|Foo}}</div>
11617 <blockquote>{{echo|Foo}}</blockquote>
11620 <blockquote>Foo</blockquote>
11630 Templates: P-wrapping: 1a. Templates on consecutive lines
11641 Templates: P-wrapping: 1b. Templates on consecutive lines
11655 Templates: P-wrapping: 1c. Templates on consecutive lines
11658 {{echo|bar}} <div>baz</div>
11671 Templates: P-wrapping: 1d. Template preceded by comment-only line
11680 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11684 Templates: Inline Text: 1. Multiple template uses
11686 {{echo|Foo}}bar{{echo|baz}}
11693 Templates: Inline Text: 2. Back-to-back template uses
11695 {{echo|Foo}}{{echo|bar}}
11702 Templates: Block Tags: 1. Multiple template uses
11704 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11706 <div>Foo</div><div>bar</div><div>baz</div>
11711 Templates: Block Tags: 2. Back-to-back template uses
11713 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11715 <div>Foo</div><div>bar</div>
11719 # This is an edge case relating to paragraph wrapping.
11721 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11726 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\nb</p>"}},"i":0}}]}'>a
11731 Templates: Links: 1. Simple example
11733 {{echo|[[Foo|bar]]}}
11735 <p><a href="/wiki/Foo" title="Foo">bar</a>
11740 Templates: Links: 2. Generation of link href
11742 [[{{echo|Foo}}|bar]]
11744 <p><a href="/wiki/Foo" title="Foo">bar</a>
11749 Templates: Links: 3. Generation of part of a link href
11751 [[Fo{{echo|o}}|bar]]
11753 [[Foo{{echo|bar}}]]
11755 [[Foo{{echo|bar}}baz]]
11757 [[Foo{{echo|bar}}|bar]]
11759 [[:Foo{{echo|bar}}]]
11761 [[:Foo{{echo|bar}}|bar]]
11763 <p><a href="/wiki/Foo" title="Foo">bar</a>
11764 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11765 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11766 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11767 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11768 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11773 Templates: Links: 4. Multiple templates generating link href
11775 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11777 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11782 Templates: Links: 5. Generation of link text
11784 [[Foo|{{echo|bar}}]]
11786 <p><a href="/wiki/Foo" title="Foo">bar</a>
11791 Templates: Links: 5. Nested templates (only outermost template should be marked)
11793 {{echo|[[{{echo|Foo}}|bar]]}}
11795 <p><a href="/wiki/Foo" title="Foo">bar</a>
11800 Templates: HTML Tag: 1. Generation of HTML attr. key
11802 <div {{echo|style}}="color:red;">foo</div>
11804 <div style="color:red;">foo</div>
11809 Templates: HTML Tag: 2. Generation of HTML attr. value
11811 <div style={{echo|'color:red;'}}>foo</div>
11813 <div style="color:red;">foo</div>
11818 Templates: HTML Tag: 3. Generation of HTML attr key and value
11820 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11822 <div style="color:red;">foo</div>
11827 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11829 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11831 <div title="This is a long title with just one piece templated">foo</div>
11836 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11838 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11840 <div title="This is a long title with just one piece templated">foo</div>
11845 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11847 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11849 <div title="This is a long title with just one piece templated">foo</div>
11853 # SSS FIXME: While it is great we added support for all this,
11854 # do we want to make this part of the spec? Maybe we want to
11855 # deprecate this kind of usage in the future?
11857 Templates: HTML Tag: 7. Generation of partial attribute key string
11859 <div st{{echo|yle}}="color:red;">foo</div>
11861 <div style="color:red;">foo</div>
11866 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11868 <div {{echo|1=id="v1"}}>bar</div>
11870 <div id="v1">bar</div>
11875 Templates: HTML Tag: 9. Multiple template-generated attributes
11877 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11879 <div id="v1" title="foo">bar</div>
11884 Templates: Support for templates generating attributes and content
11886 {| {{mixed_attr_content_template}}
11891 <table style="color:red;" title="T48811">
11901 <table style="color:red;" title="T48811" about="#mwt1" typeof="mw:Transclusion mw:ExpandedAttrs" data-mw='{"parts":["{| ",{"template":{"target":{"wt":"mixed_attr_content_template","href":"./Template:Mixed_attr_content_template"},"params":{},"i":0}},"\n|-\n|bar\n|}"]}'>
11910 1. Entities and nowikis inside templated attributes should be handled correctly
11912 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11914 <div style="background:#f9f9f9;">foo</div>
11917 <div style="background:#f9f9f9;" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html"}' data-mw='{"attribs":[[{"txt":"style","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[5,49,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"style{{=}}\\\"background:&amp;#35;f9f9f9;\\\"\"}},\"i\":0}}]}'>style</span><span typeof=\"mw:Nowiki\" about=\"#mwt1\" data-parsoid=\"{}\">=</span><span about=\"#mwt1\" data-parsoid=\"{}\">\"background:</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#35;\",\"srcContent\":\"#\"}'>#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
11921 2. Entities and nowikis inside templated attributes should be handled correctly
11924 |{{table_attribs_3}}
11929 <td style="background:#f9f9f9;">Foo
11934 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":0}}]}'>Foo</td></tr>
11939 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11942 |{{table_attribs_3}}
11947 <td style="background:#f9f9f9;">Foo
11951 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":1}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":2}}]}'>
11952 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11958 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11961 | {{table_attribs_6}} hi
11966 <td style="background: red;"> hi
11971 <tbody><tr><td style="background: red;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["| ",{"template":{"target":{"wt":"table_attribs_6","href":"./Template:Table_attribs_6"},"params":{},"i":0}}," hi"]}'> hi</td></tr>
11976 Templates: HTML Tables: 1. Generating start of a HTML table
11978 {{echo|<table><tr><td>foo</td>}}</tr></table>
11980 <table><tr><td>foo</td></tr></table>
11985 Templates: HTML Tables: 2a. Generating middle of a HTML table
11987 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11989 <table><tr><td>foo</td></tr></table>
11994 Templates: HTML Tables: 2b. Generating middle of a HTML table
11996 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11998 <table><tr><td>foo</td></tr></table>
12003 Templates: HTML Tables: 3. Generating end of a HTML table
12005 <table><tr>{{echo|<td>foo</td></tr></table>}}
12007 <table><tr><td>foo</td></tr></table>
12012 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12014 {{echo|<table>}}<tr><td>foo</td></tr></table>
12016 <table><tr><td>foo</td></tr></table>
12021 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12023 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12025 <table><tr><td>foo</td></tr></table>
12030 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12032 <table><tr>{{echo|<td>}}foo</td></tr></table>
12034 <table><tr><td>foo</td></tr></table>
12039 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12041 <table><tr><td>foo{{echo|</td>}}</tr></table>
12043 <table><tr><td>foo</td></tr></table>
12048 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12050 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12052 <table><tr><td>foo</td></tr></table>
12057 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12059 <table><tr><td>foo</td></tr>{{echo|</table>}}
12061 <table><tr><td>foo</td></tr></table>
12066 Templates: HTML Tables: 5. Proper fostering of categories from inside
12068 parsoid=wt2html,wt2wt
12070 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12071 <!--Two categories (Bug 50330)-->
12072 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12074 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12075 <!--Two categories (Bug 50330)-->
12076 <link rel="mw:PageProp/Category" href="./Category:Bar1"><link rel="mw:PageProp/Category" href="./Category:Bar2"><table><tbody><tr><td>foo</td></tr></tbody></table>
12080 Templates: Wiki Tables: 1a. Fostering of entire template content
12088 <tr><td></td></tr></table>
12100 Templates: Wiki Tables: 1b. Fostering of entire template content
12113 <tr><td></td></tr></table>
12127 Templates: Wiki Tables: 2. Fostering of partial template content
12137 <tr><td></td></tr></table>
12150 Templates: Wiki Tables: 3. td-content via multiple templates
12153 {{echo|{{pipe}}a}}{{echo|b}}
12164 Templates: Wiki Tables: 4. Templated tags, no content
12170 <tr><td></td></tr></table>
12175 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12189 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12202 ## This test case is very specific to Parsoid's internals
12203 ## and is hence only tested for Parsoid's code. Parsoid uses
12204 ## a <meta> marker tag for <ref> tags and they are expanded
12205 ## much later. We are verifying that this <meta> tag usage
12206 ## doesn't prevent foster parenting.
12208 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12210 {{PartialTable}}<ref>foo</ref>
12215 <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span><table about="#mwt2">
12219 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
12223 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12233 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n{{{!}}\n{{!}}-"}},"i":0}},"\n<onlyinclude>\n|foo\n</onlyinclude>\n{{!}}}"]}'>
12234 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12238 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12243 Templates: Lists: Multi-line list-items via templates
12245 *{{echo|a {{nonexistent|
12247 *{{echo|b {{nonexistent|
12250 <ul><li>a <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li>
12251 <li>b <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li></ul>
12256 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12258 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12260 <p><i>ab</i>c<i>d</i>e
12265 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12266 (PHP parser generates misnested html)
12268 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12270 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"''a"}},"i":0}}]}"><i>a</i></span><i about="#mwt2" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"b''c''d"}},"i":0}},{"template":{"target":{"wt":"echo_with_span","href":"./Template:Echo_with_span"},"params":{"1":{"wt":"''e"}},"i":1}}]}"><span>b</span></i><span about="#mwt2">c</span><i about="#mwt2">d<span></span></i><span about="#mwt2">e</span></p>
12274 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12275 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12277 parsoid=wt2html,wt2wt
12279 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12281 <div about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"''a"}},"i":0}}]}"><i>a</i></div>
12282 <div about="#mwt2" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"b''c''d"}},"i":0}}]}"><i>b</i>c<i>d</i></div>
12283 <div about="#mwt3" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo_with_div","href":"./Template:Echo_with_div"},"params":{"1":{"wt":"''e"}},"i":0}}]}">e</div>
12287 Templates: Ugly nesting: 4. Divs opened/closed across templates
12289 a<div>b{{echo|c</div>d}}e
12300 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12306 |{{echo|foo</table>}}
12310 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</table>"}},"i":0}},"\n|bar\n|}"]}'>
12314 <td>foo</td></tr></tbody></table><span about="#mwt1">
12315 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12320 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12330 <td>1. {{echo|foo </table>}}</td>
12332 <td>2. {{echo|baz </table>}}</td>
12345 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["<table>\n <tr>\n <td>\n <table>\n <tr>\n <td>1. ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo </table>"}},"i":0}},"</td>\n <td> bar </td>\n <td>2. ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"baz </table>"}},"i":1}},"</td>\n </tr>\n <tr>\n <td>abc</td>\n </tr>\n </table>\n </td>\n </tr>\n <tr>\n <td>xyz</td>\n </tr>\n</table>"]}'>
12350 <td>1. foo </td></tr></tbody></table></td>
12352 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12353 </span><span about="#mwt2">
12354 </span><span about="#mwt2">
12355 </span><span about="#mwt2">abc</span><span about="#mwt2">
12356 </span><span about="#mwt2">
12357 </span><span about="#mwt2">
12358 </span><span about="#mwt2">
12359 </span><span about="#mwt2">
12360 </span><span about="#mwt2">
12361 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12362 </span><span about="#mwt2">
12367 Templates: Ugly templates: 3. newline-only template parameter
12376 # This looks like a bug: a single newline triggers p/br for some reason.
12378 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12387 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12388 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12390 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12396 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>foo"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</table>"}},"i":2}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}'>foo
12397 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12401 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12402 # that are "identical" and generate nesting cycles in the algorithm
12404 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12406 {{echo|<table><tr><td><table>}}
12410 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table><tr><td><table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
12411 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12412 </table></td></tr></tbody></table>
12416 Templates: Parameters substituted at the top-level
12418 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12420 <p><i>who</i> me? <b>never!</b>
12423 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12427 Parser Functions: 1. Simple example
12436 Parser Functions: 2. Nested use (only outermost should be marked up)
12445 ### Pre-save transform tests
12448 pre-save transform: subst:
12454 This is a test template
12458 pre-save transform: normal template
12468 pre-save transform: nonexistent template
12472 {{thistemplatedoesnotexist}}
12474 {{thistemplatedoesnotexist}}
12478 pre-save transform: subst magic variables
12487 # This is bug 89, which I fixed. -- wtm
12489 pre-save transform: subst: templates with parameters
12493 {{subst:paramtest|param="something else"}}
12495 This is a test template with parameter "something else"
12499 Template:nowikitest
12501 <nowiki>'''not wiki'''</nowiki>
12505 pre-save transform: nowiki in subst (bug 1188)
12509 {{subst:nowikitest}}
12511 <nowiki>'''not wiki'''</nowiki>
12515 Template:commenttest
12517 This template has <!-- a comment --> in it.
12521 pre-save transform: comment in subst (bug 1936)
12525 {{subst:commenttest}}
12527 This template has <!-- a comment --> in it.
12531 pre-save transform: unclosed tag
12535 <nowiki>'''not wiki'''
12537 <nowiki>'''not wiki'''
12541 pre-save transform: mixed tag case
12545 <NOwiki>'''not wiki'''</noWIKI>
12547 <NOwiki>'''not wiki'''</noWIKI>
12551 pre-save transform: unclosed comment in <nowiki>
12555 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12557 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12560 # Leading @ in this template definition works around a limitation
12561 # in parsoid's parserTests which otherwise strips the <span> from the
12562 # result (confusing it for a template wrapper)
12566 @<span onmouseover="alert('crap')">Oh no</span>
12570 (confirming safety of fix for subst bug 1936)
12572 {{Template:dangerous}}
12574 <p>@<span>Oh no</span>
12579 pre-save transform: comment containing gallery (bug 5024)
12583 <!-- <gallery>data</gallery> -->
12585 <!-- <gallery>data</gallery> -->
12589 pre-save transform: comment containing extension
12593 <!-- <tag>data</tag> -->
12595 <!-- <tag>data</tag> -->
12599 pre-save transform: comment containing nowiki
12603 <!-- <nowiki>data</nowiki> -->
12605 <!-- <nowiki>data</nowiki> -->
12609 pre-save transform: <noinclude> in subst (bug 3298)
12619 pre-save transform: <onlyinclude> in subst (bug 3298)
12623 {{subst:Includes2}}
12631 {{<includeonly>subst:</includeonly>Includes}}
12635 Template:SafeSubstTest
12637 {{<includeonly>safesubst:</includeonly>Includes}}
12641 bug 22297: safesubst: works during PST
12645 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12651 bug 22297: safesubst: works during normal parse
12660 subst: does not work during normal parse
12664 <p>{{subst:Includes}}
12669 pre-save transform: context links ("pipe trick")
12673 [[Article (context)|]]
12676 [[Bar:Article (context)|]]
12677 [[:Bar:Article (context)|]]
12679 [[|Article (context)]]
12683 [[Article (context)|Article]]
12684 [[Bar:Article|Article]]
12685 [[:Bar:Article|Article]]
12686 [[Bar:Article (context)|Article]]
12687 [[:Bar:Article (context)|Article]]
12689 [[Article (context)]]
12690 [[Bar:X (Y) Z|X (Y) Z]]
12691 [[:Bar:X (Y) Z|X (Y) Z]]
12695 pre-save transform: context links ("pipe trick") with interwiki prefix
12699 [[interwiki:Article|]]
12700 [[:interwiki:Article|]]
12701 [[interwiki:Bar:Article|]]
12702 [[:interwiki:Bar:Article|]]
12704 [[interwiki:Article|Article]]
12705 [[:interwiki:Article|Article]]
12706 [[interwiki:Bar:Article|Bar:Article]]
12707 [[:interwiki:Bar:Article|Bar:Article]]
12711 pre-save transform: context links ("pipe trick") with parens in title
12713 pst title=[[Somearticle (context)]]
12717 [[Article (context)|Article]]
12721 pre-save transform: context links ("pipe trick") with comma in title
12723 pst title=[[Someplace, Somewhere]]
12726 [[Otherplace, Elsewhere|]]
12727 [[Otherplace, Elsewhere, Anywhere|]]
12729 [[Otherplace, Somewhere|Otherplace]]
12730 [[Otherplace, Elsewhere|Otherplace]]
12731 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12735 pre-save transform: context links ("pipe trick") with parens and comma
12737 pst title=[[Someplace (IGNORED), Somewhere]]
12740 [[Otherplace (place), Elsewhere|]]
12742 [[Otherplace, Somewhere|Otherplace]]
12743 [[Otherplace (place), Elsewhere|Otherplace]]
12747 pre-save transform: context links ("pipe trick") with comma and parens
12749 pst title=[[Who, me? (context)]]
12752 [[Me, Myself, and I (1937 song)|]]
12754 [[Yes, you. (context)|Yes, you.]]
12755 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12759 pre-save transform: context links ("pipe trick") with namespace
12761 pst title=[[Ns:Somearticle]]
12765 [[Ns:Article|Article]]
12769 pre-save transform: context links ("pipe trick") with namespace and parens
12771 pst title=[[Ns:Somearticle (context)]]
12775 [[Ns:Article (context)|Article]]
12779 pre-save transform: context links ("pipe trick") with namespace and comma
12781 pst title=[[Ns:Somearticle, Context, Whatever]]
12785 [[Ns:Article, Context, Whatever|Article]]
12789 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12791 pst title=[[Ns:Somearticle, Context (context)]]
12795 [[Ns:Article (context)|Article]]
12799 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12801 pst title=[[Ns:Somearticle (IGNORED), Context]]
12805 [[Ns:Article, Context|Article]]
12809 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12813 [[Article(context)|]]
12814 [[Bar:Article(context)|]]
12815 [[:Bar:Article(context)|]]
12816 [[|Article(context)]]
12820 [[Article(context)|Article]]
12821 [[Bar:Article(context)|Article]]
12822 [[:Bar:Article(context)|Article]]
12823 [[Article(context)]]
12824 [[Bar:X(Y)Z|X(Y)Z]]
12825 [[:Bar:X(Y)Z|X(Y)Z]]
12829 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12833 [[Article (context)|]]
12834 [[Bar:Article (context)|]]
12835 [[:Bar:Article (context)|]]
12836 [[|Article (context)]]
12840 [[Article (context)|Article]]
12841 [[Bar:Article (context)|Article]]
12842 [[:Bar:Article (context)|Article]]
12843 [[Article (context)]]
12844 [[Bar:X (Y) Z|X (Y) Z]]
12845 [[:Bar:X (Y) Z|X (Y) Z]]
12849 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12853 [[Article(context)|]]
12854 [[Bar:Article(context)|]]
12855 [[:Bar:Article(context)|]]
12856 [[|Article(context)]]
12860 [[Article(context)|Article]]
12861 [[Bar:Article(context)|Article]]
12862 [[:Bar:Article(context)|Article]]
12863 [[Article(context)]]
12864 [[Bar:X(Y)Z|X(Y)Z]]
12865 [[:Bar:X(Y)Z|X(Y)Z]]
12869 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12873 [[Article (context), context|]]
12874 [[Article (context),context|]]
12875 [[Bar:Article (context), context|]]
12876 [[Bar:Article (context),context|]]
12877 [[:Bar:Article (context), context|]]
12878 [[:Bar:Article (context),context|]]
12880 [[Article (context), context|Article]]
12881 [[Article (context),context|Article]]
12882 [[Bar:Article (context), context|Article]]
12883 [[Bar:Article (context),context|Article]]
12884 [[:Bar:Article (context), context|Article]]
12885 [[:Bar:Article (context),context|Article]]
12889 pre-save transform: trim trailing empty lines
12893 Empty lines are trimmed
12899 Empty lines are trimmed
12903 pre-save transform: Signature expansion
12908 * <noinclude>~~~</noinclude>
12909 * <includeonly>~~~</includeonly>
12910 * <onlyinclude>~~~</onlyinclude>
12912 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12913 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12914 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12915 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12920 pre-save transform: Signature expansion in nowiki tags (bug 93)
12926 <nowiki>~~~~</nowiki>
12928 <includeonly><nowiki>~~~~</nowiki></includeonly>
12930 <noinclude><nowiki>~~~~</nowiki></noinclude>
12932 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12934 {{subst:Foo}} shall be converted to FOO
12936 As well as inside noinclude/onlyinclude
12937 <noinclude>{{subst:Foo}}</noinclude>
12938 <onlyinclude>{{subst:Foo}}</onlyinclude>
12940 But not inside includeonly
12941 <includeonly>{{subst:Foo}}</includeonly>
12945 <nowiki>~~~~</nowiki>
12947 <includeonly><nowiki>~~~~</nowiki></includeonly>
12949 <noinclude><nowiki>~~~~</nowiki></noinclude>
12951 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12953 FOO shall be converted to FOO
12955 As well as inside noinclude/onlyinclude
12956 <noinclude>FOO</noinclude>
12957 <onlyinclude>FOO</onlyinclude>
12959 But not inside includeonly
12960 <includeonly>{{subst:Foo}}</includeonly>
12964 Parsoid: Recognize nowiki with trailing space in tags
12968 <nowiki ><div>[[foo]]</nowiki >
12976 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12983 Parsoid: Recognize nowiki with odd capitalization
12987 <noWikI ><div>[[foo]]</Nowiki >
12989 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12994 Parsoid: Escape nowiki with trailing space in tags
12998 <p><nowiki > foo </nowiki ></p>
12999 <p>a<nowiki />b</p>
13000 <p>c<nowiki/ >d</p>
13002 <nowiki > foo </nowiki >
13010 Parsoid: Escape weird noWikI capitalizations
13014 <p><noWikI > foo </NoWikI ></p>
13016 <noWikI > foo </NoWikI >
13020 ### Message transform tests
13023 message transform: magic variables
13033 message transform: should not transform wiki markup
13043 message transform: <noinclude> in transcluded template (bug 4926)
13053 message transform: <onlyinclude> in transcluded template (bug 4926)
13063 {{#special:}} page name, known
13067 {{#special:Recentchanges}}
13069 Special:RecentChanges
13073 {{#special:}} page name with subpage, known
13077 {{#special:Recentchanges/param}}
13079 Special:RecentChanges/param
13083 {{#special:}} page name, unknown
13087 {{#special:foobar nonexistent}}
13089 Special:Foobar nonexistent
13093 {{#speciale:}} page name, known
13097 {{#speciale:Recentchanges}}
13099 Special:RecentChanges
13103 {{#speciale:}} page name with subpage, known
13107 {{#speciale:Recentchanges/param}}
13109 Special:RecentChanges/param
13113 {{#speciale:}} page name, unknown
13117 {{#speciale:foobar nonexistent}}
13119 Special:Foobar_nonexistent
13125 ### For Parsoid-specific tests, see
13126 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13131 parsoid=wt2html,wt2wt,html2html
13133 [[Image:foobar.jpg]]
13135 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13138 <p><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13142 Simple image (using File: namespace, now canonical)
13144 [[File:Foobar.jpg]]
13146 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13149 <p><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13153 Right-aligned image
13155 [[File:Foobar.jpg|right]]
13157 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
13160 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13166 [[File:Foobar.jpg|right|Caption text]]
13168 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
13171 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
13175 Image with caption, bug 53312 #1
13177 [[File:Foobar.jpg|right|Caption page stuff]]
13179 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page stuff"><img alt="Caption page stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
13182 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page stuff</figcaption></figure>
13186 Image with caption, bug 53312 #2
13188 [[File:Foobar.jpg|right|Caption page=]]
13190 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page="><img alt="Caption page=" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
13193 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=</figcaption></figure>
13197 Image with caption, bug 53312 #3
13199 [[File:Foobar.jpg|right|Caption page=stuff]]
13201 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page=stuff"><img alt="Caption page=stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
13204 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=stuff</figcaption></figure>
13208 Allow empty links in image captions (Bug 60753)
13212 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13217 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Caption <a href="/index.php?title=Link1&action=edit&redlink=1" class="new" title="Link1 (page does not exist)">Link1</a> [[]] <a href="/index.php?title=Link2&action=edit&redlink=1" class="new" title="Link2 (page does not exist)">Link2</a></div></div></div>
13220 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption [[Link1]]\n[[]]\n[[Link2]]\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption <a rel="mw:WikiLink" href="./Link1" title="Link1" data-parsoid='{"stx":"simple","a":{"href":"./Link1"},"sa":{"href":"Link1"}}'>Link1</a>
13222 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13223 </figcaption></figure>
13227 Titles in unlinked images (T23454)
13229 [[File:Foobar.jpg|link=|stuff]]
13231 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13236 Link with empty target
13245 Image with link trail
13247 Linktrails should not work for images: [[File:Foobar.jpg]]s
13249 <p>Linktrails should not work for images: <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>s
13252 <p>Linktrails should not work for images: <span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span>s</p>
13256 Image with empty attribute
13258 parsoid=wt2html,wt2wt,html2html
13260 [[File:Foobar.jpg|right||Caption text]]
13262 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
13265 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
13269 1. Block image with individual attributes from templates
13271 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13273 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
13276 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,38,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
13280 2. Block Image with individual attributes from templates
13282 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13284 <div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
13287 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"{{echo|thumb}}"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,32,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"thumb\"}},\"i\":0}}]}'>thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[33,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
13291 3. Inline image with individual attributes from templates
13293 [[File:Foobar.jpg|{{echo|50px}}]]
13295 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
13298 <p><span typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}' data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"50px\"}},\"i\":0}}]}'>50px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13301 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13302 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13304 Image with multiple attributes from the same template
13306 [[File:Foobar.jpg|{{image_attribs}}]]
13308 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
13311 <figure class="mw-default-size mw-halign-right" typeof="mw:Image mw:Placeholder"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
13315 Image with link tails
13319 123[[File:Foobar.jpg]]456
13320 123[[File:Foobar.jpg|right]]456
13321 123[[File:Foobar.jpg|thumb]]456
13323 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
13325 123<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>456
13326 123<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>456
13329 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456</p>
13331 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
13333 <div class="thumb tright">
13334 <div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>
13335 <div class="thumbcaption">
13336 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13342 <p>123<span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span>456</p>
13343 <p>123</p><figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure><p>456</p>
13344 <p>123</p><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure><p>456</p>
13348 Image with multiple captions -- only last one is accepted
13350 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13352 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption3 - accepted"><img alt="Caption3 - accepted" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
13355 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption3 - accepted</figcaption></figure>
13359 Image with multiple widths -- use last
13361 [[File:Foobar.jpg|200px|300px|caption]]
13363 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a>
13366 <p><span typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></span></p>
13370 Image with multiple alignments -- use first (bug 48664)
13374 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13376 [[File:Foobar.jpg|middle|text-top|caption]]
13378 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
13379 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" style="vertical-align: middle" /></a>
13382 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13383 <p><span class="mw-default-size mw-valign-middle" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13387 Image with width attribute at different positions
13389 [[File:Foobar.jpg|200px|right|Caption]]
13390 [[File:Foobar.jpg|right|200px|Caption]]
13391 [[File:Foobar.jpg|right|Caption|200px]]
13393 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
13394 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
13395 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
13398 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
13399 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
13400 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
13403 # a sad bit of backward-compatibility
13405 Image with size specified with pxpx (bug 13500, 51628)
13407 parsoid=wt2html,wt2wt,html2html
13409 [[File:Foobar.jpg|20pxpx]]
13410 [[File:Foobar.jpg|200x20pxpx]]
13412 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
13413 <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" width="177" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/265px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/353px-Foobar.jpg 2x" /></a>
13416 <p><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></span> <span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="177"/></a></span></p>
13420 Image with link parameter, wiki target
13422 [[File:Foobar.jpg|link=Main Page]]
13424 <p><a href="/wiki/Main_Page" title="Main Page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13427 <p><span class="mw-default-size" typeof="mw:Image"><a href="Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13430 # parsoid bug 49293 (part 1)
13432 Image with link parameter, URL target
13434 [[File:Foobar.jpg|link=http://example.com/]]
13436 <p><a href="http://example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13439 <p><span class="mw-default-size" typeof="mw:Image"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13442 # parsoid bug 49293 (part 2)
13444 Image with link parameter, protocol-less URL target
13446 [[File:Foobar.jpg|link=//example.com/]]
13448 <p><a href="//example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13451 <p><span class="mw-default-size" typeof="mw:Image"><a href="//example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13455 Escaping non-block captions (T107435)
13458 "modes": ["wt2wt"],
13460 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13464 [[Image:Foobar.jpg|caption]]
13466 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13469 # wgExternalLinkTarget not supported by Parsoid
13471 Image with link parameter, wgExternalLinkTarget
13473 [[Image:foobar.jpg|link=http://example.com/]]
13475 wgExternalLinkTarget='foobar'
13477 <p><a href="http://example.com/" target="foobar" rel="nofollow noreferrer noopener"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13482 Image with link parameter, wgNoFollowLinks set to false
13484 [[Image:foobar.jpg|link=http://example.com/]]
13486 wgNoFollowLinks=false
13488 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13493 Image with link parameter, wgNoFollowDomainExceptions
13495 [[Image:foobar.jpg|link=http://example.com/]]
13497 wgNoFollowDomainExceptions='example.com'
13499 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13503 # wgExternalLinkTarget not supported by Parsoid
13505 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13507 [[Image:foobar.jpg|link=http://example.com/|Title]]
13509 wgExternalLinkTarget='foobar'
13511 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow noreferrer noopener"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13516 Image with empty link parameter
13518 [[File:Foobar.jpg|link=]]
13520 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13523 <p><span class="mw-default-size" typeof="mw:Image"><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></span></span></p>
13527 Image with link parameter (wiki target) and unnamed parameter
13529 [[File:Foobar.jpg|link=Main_Page|Title]]
13531 <p><a href="/wiki/Main_Page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13534 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13538 Image with link parameter (URL target) and unnamed parameter
13540 [[File:Foobar.jpg|link=http://example.com/|Title]]
13542 <p><a href="http://example.com/" title="Title" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13545 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13549 Thumbnail image with link parameter
13552 parsoid=wt2html,wt2wt,html2html
13554 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13556 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="http://example.com/"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
13559 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Title</figcaption></figure>
13563 Manually-specified thumbnail image
13567 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13569 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Foobar.jpg"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
13572 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
13576 Manually-specified thumbnail image with explicit link to wiki page
13579 parsoid=wt2html,wt2wt,html2html
13581 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13583 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
13586 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
13590 Manually-specified thumbnail image with explicit link to url
13593 parsoid=wt2html,wt2wt,html2html
13595 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13597 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="http://example.com"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
13600 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="http://example.com"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
13604 Manually-specified thumbnail image with explicit no link
13607 parsoid=wt2html,wt2wt,html2html
13609 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13611 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
13614 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><span><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></span><figcaption>Title</figcaption></figure>
13618 Manually-specified thumbnail image with explicit link and alt text
13621 parsoid=wt2html,wt2wt,html2html
13623 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13625 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="alttext" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
13628 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="Main_Page"><img alt="alttext" resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
13632 Image with frame and link
13634 parsoid=wt2html,wt2wt,html2html
13636 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13638 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
13641 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a></figcaption></figure>
13645 Image with frame and link and explicit alt
13647 parsoid=wt2html,wt2wt,html2html
13649 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13651 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
13654 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img alt="Altitude" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a></figcaption></figure>
13658 Image with wiki markup in implicit alt
13660 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13662 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13664 <p><a href="/wiki/File:Foobar.jpg" class="image" title="testing bold in alt"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13665 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13668 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"testing '''bold''' in alt"}]}' data-mw='{"caption":"testing <b data-parsoid='{\"dsr\":[27,37,3,3]}'>bold</b> in alt"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></span></p>
13670 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=testing '''bold''' in alt"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"testing bold in alt","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=testing '''bold''' in alt","resource":"Image:Foobar.jpg"}}'/></a></span></p>
13674 Alt image option should handle most kinds of wikitext without barfing
13676 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13678 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a link and a bold template." src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is the image caption</div></div></div>
13681 <figure class="mw-default-size" typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"This is the image caption"},{"ck":"alt","ak":"alt=This is a [[link]] and a {{echo|''bold template''}}."}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["alt",{"html":"alt=This is a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[65,73,2,2]}'>link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[80,106,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&#39;&#39;bold template&#39;&#39;\"}},\"i\":0}}]}'>bold template</i>."}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="This is a link and a bold template." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"alt":"This is a link and a bold template.","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=This is a [[link]] and a {{echo|''bold template''}}.","resource":"Image:Foobar.jpg"}}'/></a><figcaption>This is the image caption</figcaption></figure>
13684 ###################
13685 # Conflicting image format options.
13686 # First option specified should 'win'.
13687 # All three cases in each test should be identical.
13690 Image with 'frameless' first.
13692 parsoid=wt2html,wt2wt,html2html
13694 [[File:Foobar.jpg|frameless|caption]]
13696 [[File:Foobar.jpg|frameless|frame|caption]]
13698 [[File:Foobar.jpg|frameless|thumb|caption]]
13700 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
13701 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
13702 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
13705 <p><span class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
13706 <p><span class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
13707 <p><span class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
13711 Image with 'frame' first.
13713 parsoid=wt2html,wt2wt,html2html
13715 [[File:Foobar.jpg|frame|caption]]
13716 [[File:Foobar.jpg|frame|frameless|caption]]
13717 [[File:Foobar.jpg|frame|thumb|caption]]
13719 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
13720 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
13721 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
13724 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
13725 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
13726 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
13730 Image with 'thumb' first.
13732 parsoid=wt2html,wt2wt,html2html
13734 [[File:Foobar.jpg|thumb|caption]]
13735 [[File:Foobar.jpg|thumb|frameless|caption]]
13736 [[File:Foobar.jpg|thumb|frame|caption]]
13738 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
13739 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
13740 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
13743 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13744 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13745 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13748 ###################
13750 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13751 # and https://phabricator.wikimedia.org/T64258
13752 # Foobar has actual size of 1941x220
13753 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13754 # a scalable format.
13755 # 2. Framed images always ignore size options; always render at default size.
13756 # 3. "Unspecified format" and border are the only types which can be
13760 Image: "unspecified format" and border enlarge
13762 parsoid=wt2html,wt2wt,html2html
13764 [[File:Foobar.jpg|2000px]]
13766 [[File:Foobar.jpg|border|2000px]]
13768 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" /></a>
13769 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" class="thumbborder" /></a>
13772 <p><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></span></p>
13773 <p><span class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></span></p>
13777 Image: "unspecified format" and border reduce
13779 parsoid=wt2html,wt2wt,html2html
13781 [[File:Foobar.jpg|1000px]]
13783 [[File:Foobar.jpg|border|1000px]]
13785 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
13786 </p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" class="thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
13789 <p><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></span></p>
13790 <p><span class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></span></p>
13794 Image: thumbs reduce
13796 parsoid=wt2html,wt2wt,html2html
13798 [[File:Foobar.jpg|thumb|50px]]
13800 <div class="thumb tright"><div class="thumbinner" style="width:52px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
13803 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure>
13807 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13809 parsoid=wt2html,wt2wt,html2html
13811 [[File:Foobar.jpg|thumb|2000px]]
13813 [[File:Foobar.svg|thumb|2000px]]
13815 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
13816 <div class="thumb tright"><div class="thumbinner" style="width:2002px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div></div></div></div>
13819 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13820 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure>
13824 Image: frameless can reduce in size
13826 parsoid=wt2html,wt2wt,html2html
13828 [[File:Foobar.jpg|frameless|50px]]
13830 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
13833 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
13837 Image: bitmap frameless can't be enlarged past original size, but vector can
13839 parsoid=wt2html,wt2wt,html2html
13841 [[File:Foobar.jpg|frameless|2000px]]
13843 [[File:Foobar.svg|frameless|2000px]]
13845 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13846 </p><p><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a>
13849 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
13850 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></span></p>
13854 Image: framed images are always unscaled.
13856 parsoid=wt2html,wt2wt,html2html
13858 [[File:Foobar.jpg|frame]]
13860 [[File:Foobar.jpg|frame|50px]]
13862 [[File:Foobar.jpg|frame|50x50px]]
13864 [[File:Foobar.jpg|frame|2000px]]
13866 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
13867 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
13868 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
13869 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
13872 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13873 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13874 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13875 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13878 ###################
13881 Link to image page- image page normally doesn't exists, hence edit link
13882 Add test with existing image page
13883 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13887 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13892 bug 18784 Link to non-existent image page with caption should use caption as link text
13894 [[:Image:test|caption]]
13896 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13901 Frameless image caption with a free URL
13903 [[File:Foobar.jpg|http://example.com]]
13905 <p><a href="/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="http://example.com" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13908 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"http://example.com"}]}' data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid='{\"stx\":\"url\",\"dsr\":[18,36,0,0]}'>http://example.com</a>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13912 Thumbnail image caption with a free URL
13916 [[File:Foobar.jpg|thumb|http://example.com]]
13918 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
13921 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
13925 Thumbnail image caption with a free URL and explicit alt
13928 parsoid=wt2html,wt2wt,html2html
13930 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13932 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
13935 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img alt="Alteration" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
13939 SVG thumbnails with no language set
13942 [[File:Foobar.svg|thumb|caption]]
13944 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
13947 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
13951 SVG thumbnails with language de
13953 parsoid=wt2html,wt2wt,html2html
13955 [[File:Foobar.svg|thumb|caption|lang=de]]
13957 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=File:Foobar.svg&lang=de" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/langde-180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langde-270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langde-360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
13960 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
13964 SVG thumbnails with invalid language code
13966 parsoid=wt2html,wt2wt,html2html
13968 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13970 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>lang=invalid.language.code</div></div></div>
13973 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid.language.code</figcaption></figure>
13977 BUG 1887: A ISBN with a thumbnail
13979 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13981 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
13984 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 1235467890</a></figcaption></figure>
13988 BUG 1887: A RFC with a thumbnail
13990 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13992 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
13995 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is <a href="//tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
13999 BUG 1887: A mailto link with a thumbnail
14001 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14003 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
14006 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Please <a rel="mw:ExtLink" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
14009 # Pending resolution to bug 368
14011 BUG 648: Frameless image caption with a link
14013 [[File:Foobar.jpg|text with a [[link]] in it]]
14015 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14018 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,38,2,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14022 BUG 648: Frameless image caption with a link (suffix)
14024 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14026 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a linkfoo in it"><img alt="text with a linkfoo in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14029 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]]foo in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,41,2,5],\"tail\":\"foo\"}'>linkfoo</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14033 BUG 648: Frameless image caption with an interwiki link
14035 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14037 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img alt="text with a MeatBall:Link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14040 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,47,2,2]}'>MeatBall:Link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14044 BUG 648: Frameless image caption with a piped interwiki link
14046 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14048 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14051 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link|link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,52,16,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14055 T107474: Frameless image caption with <nowiki>
14057 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14059 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>"}]}' data-mw='{"caption":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[18,75,8,9]}'>text with a [[MeatBall:Link|link]] in it</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14063 Escape HTML special chars in image alt text
14065 [[File:Foobar.jpg|& < > "]]
14067 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14070 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"& < > \""}]}' data-mw='{"caption":"&amp; &lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14074 Entities in file name and attributes
14076 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14078 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14081 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"manualthumb=7%25 solution.gif"},{"ck":"link","ak":"link=7%25 solution"},{"ck":"caption","ak":"[[7%25 solution]]"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./7%25_solution\" title=\"7% solution\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./7%25_solution\"},\"sa\":{\"href\":\"7%25 solution\"},\"dsr\":[74,91,2,2]}'>7% solution</a>"}'><a href="./7%25_solution" data-parsoid='{"a":{"href":"./7%25_solution"},"sa":{"href":"link=7%25 solution"}}'><img resource="./File:7%25_solution.gif" src="./Special:FilePath/7%25_solution.gif" height="220" width="220" data-parsoid='{"a":{"resource":"./File:7%25_solution.gif","height":"220","width":"220"},"sa":{"resource":"File:7%25 solution.gif"}}'/></a></span></p>
14085 BUG 499: Alt text should have Ӓ, not &1234;
14087 [[File:Foobar.jpg|♀]]
14089 <p><a href="/wiki/File:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14092 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&#9792;"}]}' data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#9792;\",\"srcContent\":\"♀\",\"dsr\":[18,25,null,null]}'>♀</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14096 Broken image caption with link
14098 parsoid=wt2html,wt2wt,html2html
14100 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14102 <p>[[Image:Foobar.jpg|thumb|This is a broken caption. But <a href="/wiki/Main_Page" title="Main Page">this</a> is just an ordinary link.
14105 <p>[[Image:Foobar.jpg|thumb|This is a broken caption. But <a rel="mw:WikiLink" href="Main_Page" title="Main Page">this</a> is just an ordinary link.</p>
14109 Image caption containing another image
14111 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14113 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption with another <a href="/wiki/File:Thumb.png" class="image" title="image"><img alt="image" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" /></a> inside it!</div></div></div>
14116 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is a caption with another <span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"image"}'><a href="./File:Thumb.png"><img resource="./File:Thumb.png" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a></span> inside it!</figcaption></figure>
14120 Image: caption containing a newline
14122 [[File:Foobar.jpg|This
14125 <p><a href="/wiki/File:Foobar.jpg" class="image" title="This *is some text"><img alt="This *is some text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14128 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"This\n*is some text"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
14132 Image: caption containing leading space
14133 (The leading space should not trigger nowiki escaping in wt2wt mode)
14135 [[File:Foobar.jpg|thumb| bar]]
14137 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>bar</div></div></div>
14140 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> bar</figcaption></figure>
14144 Image: caption containing a table
14146 parsoid=wt2html,wt2wt,html2html
14148 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14154 and some more text.]]
14156 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is an example image thumbnail caption with a table <table> <tr> <th> Foo </th> <th> Bar </th></tr> <tr> <td> Foo1 </td> <td> Bar1 </td></tr></table> and some more text.</div></div></div>
14159 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This is an example image thumbnail caption with a table
14162 <tr><th>Foo </th><th>Bar</th></tr>
14165 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14169 Bug 3090: External links other than http: in image captions
14171 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14173 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This caption has <a rel="nofollow" class="external text" href="irc://example.net">irc</a> and <a rel="nofollow" class="external text" href="https://example.com">Secure</a> ext links in it.</div></div></div>
14176 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has <a rel="mw:ExtLink" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
14182 parsoid=wt2html,wt2wt,html2html
14184 [[Image:foobar.jpg|a|class=b]]
14186 <p><a href="/wiki/File:Foobar.jpg" class="image" title="a"><img alt="a" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="b" /></a>
14189 <p><span class="mw-default-size b" typeof="mw:Image" data-mw='{"caption":"a"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
14193 Localized image handling (1).
14195 parsoid=wt2html,wt2wt,html2html
14198 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14200 <div class="floatleft"><a href="/wiki/Foo" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
14203 <figure class="mw-default-size mw-halign-left" typeof="mw:Image"><a href="./Foo"><img resource="./Archivo:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
14207 Localized image handling (2).
14210 parsoid=wt2html,wt2wt,html2html
14213 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14215 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/Foo" title="Foo"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/Archivo:Foobar.jpg" class="internal" title="Aumentar"></a></div>caption</div></div></div>
14218 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="Foo"><img resource="./Archivo:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14222 Localized image handling (3).
14227 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure>
14229 [[File:Foobar.jpg|بندانگشتی]]
14233 "border", "frameless" and "class" attributes on an image.
14236 parsoid=wt2html,wt2wt,html2html
14238 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14240 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="extra thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>
14243 <p><span class="mw-default-size mw-image-border extra" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
14246 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14248 Invalid image attributes (bug 62500)
14251 parsoid=wt2html,wt2wt,html2html
14253 [[File:Foobar.jpg|thumb|float|left|caption]]
14255 [[File:Foobar.jpg|thumb|righ|caption]]
14257 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14259 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
14260 <div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
14261 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
14264 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14265 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14266 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14272 #REDIRECT [[File:Barfoo.jpg]]
14275 # FIXME: Parsoid should run this test -- but we'd need to teach the
14276 # mockAPI about the redirected Barfoo.jpg image.
14280 [[Image:Barfoo.jpg]]
14282 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14287 Missing image with uploads disabled
14291 [[File:Foobaz.jpg]]
14293 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14296 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Foobaz.jpg"><img resource="./File:Foobaz.jpg" src="./Special:FilePath/Foobaz.jpg" height="220" width="220"/></a></span></p>
14299 # Parsoid-specific testing for images
14300 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14301 # Currently imperfect due to a flaw in the Parsoid testrunner
14303 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14307 Parsoid-specific image handling - simple image with size and middle alignment
14309 [[File:Foobar.jpg|middle|50px]]
14311 <p><span class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
14315 Parsoid-specific image handling - simple image with size, middle alignment,
14316 non-standard namespace alias
14318 parsoid=wt2wt,wt2html,html2html
14320 [[Image:Foobar.jpg|middle|50px]]
14322 <p><span class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
14326 Parsoid-specific image handling - simple image with size and middle alignment
14329 [[File:Foobar.jpg|50px|middle]]
14331 <p><span class="mw-valign-middle" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"50px"},{"ck":"middle","ak":"middle"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14335 Parsoid-specific image handling - simple image with size and middle alignment
14336 and non-standard namespace name
14338 parsoid=wt2html,wt2wt,html2html
14340 [[Image:Foobar.jpg|50px|middle]]
14342 <p><span class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
14346 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14348 [[File:Foobar.jpg|500x10px|baseline|caption]]
14350 <p><span class="mw-valign-baseline" typeof="mw:Image" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"width","ak":"500x10px"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption"}],"size":"500x10"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/89px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="10" width="89" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"10","width":"89"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14354 Parsoid-specific image handling - simple image with border and size spec
14356 [[File:Foobar.jpg|50px|border|caption]]
14358 <p><span class="mw-image-border" typeof="mw:Image" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"width","ak":"50px"},{"ck":"border","ak":"border"},{"ck":"caption","ak":"caption"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14362 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14364 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14366 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption content</figcaption></figure>
14370 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14373 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14375 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"left","ak":"left"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption content"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption content</figcaption></figure>
14379 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14381 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14383 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a><figcaption>caption</figcaption></figure>
14387 Parsoid-specific image handling - thumbnail with specific size, halign,
14388 valign, and caption (existing content)
14390 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14392 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"50x50px"},{"ck":"right","ak":"right"},{"ck":"middle","ak":"middle"},{"ck":"caption","ak":"caption"}],"size":"50x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption</figcaption></figure>
14396 Parsoid-specific image handling - framed image with specific size and caption
14399 parsoid=wt2html,wt2wt,html2html
14401 [[File:Foobar.jpg|frame|500x50px|caption]]
14403 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
14407 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14410 parsoid=wt2html,wt2wt,html2html
14412 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14414 <figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
14418 Parsoid-specific image handling - frameless image with specific size, border, and caption
14420 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14422 <p><span class="mw-image-border" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"frameless","ak":"frameless"},{"ck":"width","ak":"442x50px"},{"ck":"border","ak":"border"},{"ck":"caption","ak":"caption"}],"size":"442x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="50" width="442" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"50","width":"442"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14426 Parsoid-specific image handling - simple image with a formatted caption
14428 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14430 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>"}]}' data-mw='{"caption":"<table data-parsoid='{\"stx\":\"html\",\"dsr\":[18,81,7,8]}'><tbody data-parsoid='{\"dsr\":[25,73,0,0]}'><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[25,54,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[29,39,4,5]}'>a</td><td data-parsoid='{\"stx\":\"html\",\"dsr\":[39,49,4,5]}'>b</td></tr><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[54,73,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[58,68,4,5]}'>c</td></tr></tbody></table>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14434 Parsoid-specific image handling - caption with a template in it
14436 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14438 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"></a><figcaption>This caption has a <span about="#mwt1" typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}">transclusion</span> in it.</figcaption></figure>
14442 Parsoid-specific image handling - caption with unbalanced tags in it
14444 parsoid=wt2html,wt2wt,html2html
14447 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14451 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has a <center>unbalanced tag in it.</center></figcaption></figure>
14456 Parsoid-specific image handling - empty caption (1)
14458 parsoid=wt2html,wt2wt
14460 [[File:Foobar.jpg|thumb|]]
14462 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption></figcaption></figure>
14465 # empty captions don't get serialized unless we're in the "round trip" case
14467 Parsoid-specific image handling - empty caption (2)
14471 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14472 <a href="./File:Foobar.jpg">
14473 <img resource="./File:Foobar.jpg"
14474 src="//example.com/images/3/3a/Foobar.jpg"
14475 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14476 height="25" width="220"/>
14478 <figcaption></figcaption>
14481 [[File:Foobar.jpg|thumb]]
14485 Parsoid-specific image handling - whitespace caption
14487 [[File:Foobar.jpg|thumb| ]]
14489 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> </figcaption></figure>
14493 Parsoid-specific image handling - lang option
14496 [[File:Foobar.svg|lang=de|caption]]
14500 <span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="180" width="240"/></a></span>
14504 ## Edge case bugs in Parsoid from T93580
14506 T93580: 1. Templated <ref> inside block images
14508 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14512 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <span about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></figcaption></figure>
14514 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14518 T93580: 2. <ref> inside inline images
14520 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14524 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,78,5,6]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14526 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14530 T93580: 3. Templated <ref> inside inline images
14532 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14536 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Transclusion mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14538 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14545 Subpage test/subpage
14553 subpage title=[[Subpage test]]
14557 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14562 Subpage noslash link
14564 subpage title=[[Subpage test]]
14568 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14573 Subpage test/1/2/subpage
14579 Relative subpage noslash link
14581 parsoid=wt2wt,wt2html,html2html
14582 subpage title=[[Subpage test/1/2/3/4]]
14588 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14589 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14592 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14593 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14597 Parsoid: dot-slash prefixed wikilinks
14607 </p><p>[[././baz/]]
14612 </p><p>[[././baz/]]
14617 Render invalid page names as plain text (bug 51090)
14630 [[{{echo|./../foo}}|bar]]
14631 [[{{echo|foo/.}}|bar]]
14632 [[{{echo|foo/..}}|bar]]
14633 [[{{echo|foo~~~~bar}}]]
14634 [[{{echo|foo>bar}}]]
14635 [[{{echo|foo././bar}}]]
14636 [[{{echo|foo{bar}}]]
14637 [[{{echo|foo}bar}}]]
14638 [[{{echo|foo[bar}}]]
14639 [[{{echo|foo]bar}}]]
14640 [[{{echo|foo<bar}}]]
14642 <p>[[./../foo|bar]]
14652 </p><p>[[./../foo|bar]]
14665 <p>[[./../foo|bar]]
14676 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14677 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14678 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14679 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14680 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14681 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14682 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14683 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14684 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14685 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14686 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<bar"}},"i":0}}]}'>foo<bar</span>]]</p>
14694 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14699 BUG 561: {{/Subpage}}
14701 subpage title=[[Page]]
14705 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14713 Category:MediaWiki User's Guide
14721 [[:Category:MediaWiki User's Guide]]
14723 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14732 [[Category:MediaWiki User's Guide]]
14734 cat=MediaWiki_User's_Guide sort=
14736 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide" data-parsoid='{"stx":"simple","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
14740 PAGESINCATEGORY invalid title fatal (r33546 fix)
14742 {{PAGESINCATEGORY:<bogus>}}
14749 Category with different sort key
14753 [[Category:MediaWiki User's Guide|Foo]]
14755 cat=MediaWiki_User's_Guide sort=Foo
14757 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#Foo" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
14761 Category with identical sort key
14765 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14767 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14769 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#MediaWiki%20User's%20Guide" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
14773 Category with empty sort key
14778 [[Category:MediaWiki User's Guide|]]
14780 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14784 Category with empty sort key and parentheses
14789 [[Category:Foo (bar)|]]
14791 [[Category:Foo (bar)|Foo]]
14795 Category with link tail
14800 123[[Category:Foo]]456
14802 123[[Category:Foo]]456
14806 Category with template
14811 [[Category:{{echo|Foo}}]]
14813 [[Category:{{echo|Foo}}]]
14817 Category with template in sort key
14822 [[Category:Foo|{{echo|Bar}}]]
14824 [[Category:Foo|{{echo|Bar}}]]
14828 Category with template in sort key and title
14833 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14835 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14838 ## We used to, but no longer wt2wt this test since the default serializer
14839 ## will normalize all categories to serialize on their own line.
14840 ## This wikitext usage is going to be fairly uncommon in production and
14841 ## selser will take care of preserving formatting in those scenarios.
14843 Category / paragraph interactions
14847 Foo [[Category:Baz]] Bar
14849 Foo [[Category:Baz]]
14857 [[Category:Baz]] Bar
14870 {{echo|[[Category:Baz]]}}
14883 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14884 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14885 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14886 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14887 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Baz]]"}},"i":0}}]}'/></p>
14888 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14891 ## We used to, but no longer wt2wt this test since the default serializer
14892 ## will normalize all categories to serialize on their own line.
14893 ## This wikitext usage is going to be fairly uncommon in production and
14894 ## selser will take care of preserving formatting in those scenarios.
14896 ## The whitespace on the empty line is part of the test. Please do not delete
14898 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14904 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14906 {{echo|[[Category:Foo]] and so should this!}}
14908 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14913 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14915 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and so should this!"}},"i":0}}]}'/><span about="#mwt1"> and so should this!</span></p>
14918 ## Parsoid will not try to wt2wt this while preserving newlines because
14919 ## it suppresses excess newlines within list items -- and we don't want to
14920 ## introduce a special case just for categories, which is, in reality somewhat
14921 ## odd behavior -- categories are unlikely to be used in list items like this
14922 ## in top-level pages and are only likely to show up in template-generated
14923 ## list items where this RT-ing is a non-issue.
14925 ## The whitespace on the empty line is part of the test. Please do not delete
14927 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14933 [[Category:Foo]] and this should be part of the same list item
14936 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14938 <ul><li>This and this should be part of the same list item</li>
14939 <li>So should this and this should be part of the same list item</li></ul>
14942 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14943 <li>So should this <link rel="mw:PageProp/Category" href="./Category:Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and this should be part of the same list item"}},"i":0}}]}'/><span> and this should be part of the same list item</span></li>
14947 ## Newlines and categories that follow the last item of a list
14948 ## are treated differently because this (list followed by categories)
14949 ## is an extremely common pattern on wikis.
14951 3. Categories and newlines: newline suppression for last list item should RT properly
14964 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14966 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14967 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14971 4. Categories and newlines: newline suppression for last list item should RT properly
14979 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14981 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14984 ## only wt2html for this to make sure the algo only applies to the rightmost path
14986 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14999 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15001 <ul><li> d</li></ul></li></ul>
15002 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15005 ## We used to, but no longer wt2wt this test since the default serializer
15006 ## will normalize all categories to serialize on their own line.
15007 ## This wikitext usage is going to be fairly uncommon in production and
15008 ## selser will take care of preserving formatting in those scenarios.
15010 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15014 * a [[Category:Foo]]
15016 <ul><li>a <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
15019 # This test also demonstrates because of newline+category tunneling
15020 # through the list hander, template wrapping doesn't expand to the
15021 # containing list when the list item swallows the category.
15023 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15028 <ul><li> <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n[[Category:Foo]]"}},"i":0}}]}'>a
15029 </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
15033 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15037 {{echo|[[Category:Foo]]
15041 <ul><li> a</li></ul>
15043 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]\n[[Category:Bar]]"}},"i":0}}]}'/><span about="#mwt1">
15044 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15045 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15049 Category links with multiple namespaces
15051 [[Category:Project:Foo]]
15053 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15057 Parsoid: Serialize link to category page with colon escape
15063 [[:Category:Foo|Bar]]
15066 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15067 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15071 # We used to, but no longer wt2wt this test since the default serializer
15072 # will normalize all categories to serialize on their own line.
15073 # This wikitext usage is going to be fairly uncommon in production and
15074 # selser will take care of preventing whitespace insertion if this
15075 # occurs in an article.
15077 # html2html disabled for the same reason (whitespace insertion between
15080 # html2wt disabled because it localizes the "Category" namespace.
15082 Link prefix/suffixes aren't applied to category links
15092 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15096 Parsoid: Serialize link to file page with colon escape
15102 [[:File:Foo.png|Bar]]
15105 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15106 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15111 Parsoid: Serialize a genuine category link without colon escape
15116 [[Category:Foo|Bar]]
15118 <link rel="mw:PageProp/Category" href="./Category:Foo">
15119 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15123 Normalize hrefs properly before testing for invalid link targets (bug 70894)
15127 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15129 [[Category:Toxine bactérienne]]
15133 Parsoid: Defaultsort
15135 {{DEFAULTSORT:Foo}}
15137 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15141 Parsoid: Defaultsort (template-generated)
15143 {{{{echo|DEFAULTSORT}}:Foo}}
15145 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DEFAULTSORT}}:Foo"},"params":{},"i":0}}]}'/>
15149 ### Inter-language links
15152 Interlanguage links
15160 es:Alimento fr:Nourriture zh:食品
15162 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15163 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15164 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15168 Duplicate interlanguage links (bug 24502)
15179 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15180 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15181 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15182 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15189 Basic section headings
15196 ===Smaller headline===
15199 <h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15202 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15205 <h3><span class="mw-headline" id="Smaller_headline">Smaller headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Smaller headline">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15211 Section headings with TOC
15214 === Subheadline 1 ===
15215 ===== Skipping a level =====
15216 ====== Skipping a level ======
15220 ===Another headline===
15222 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15224 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15226 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15228 <li class="toclevel-3 tocsection-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
15230 <li class="toclevel-4 tocsection-4"><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li>
15237 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15239 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15245 <h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15246 <h3><span class="mw-headline" id="Subheadline_1">Subheadline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Subheadline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15247 <h5><span class="mw-headline" id="Skipping_a_level">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
15248 <h6><span class="mw-headline" id="Skipping_a_level_2">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
15249 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15252 <h3><span class="mw-headline" id="Another_headline">Another headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Another headline">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15257 TOC anchors don't collide
15265 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15267 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15268 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15269 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15270 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15274 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15275 <h2><span class="mw-headline" id="Headline">Headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15276 <h2><span class="mw-headline" id="Headline_2_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15277 <h2><span class="mw-headline" id="Headline_3">Headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Headline">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15281 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15283 Handling of sections up to level 6 and beyond
15286 == Level 2 Heading==
15287 === Level 3 Heading===
15288 ==== Level 4 Heading====
15289 ===== Level 5 Heading=====
15290 ====== Level 6 Heading======
15291 ======= Level 7 Heading=======
15292 ======== Level 8 Heading========
15293 ========= Level 9 Heading=========
15294 ========== Level 10 Heading==========
15296 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15298 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15300 <li class="toclevel-2 tocsection-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
15302 <li class="toclevel-3 tocsection-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
15304 <li class="toclevel-4 tocsection-4"><a href="#Level_4_Heading"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Level 4 Heading</span></a>
15306 <li class="toclevel-5 tocsection-5"><a href="#Level_5_Heading"><span class="tocnumber">1.1.1.1.1</span> <span class="toctext">Level 5 Heading</span></a>
15308 <li class="toclevel-6 tocsection-6"><a href="#Level_6_Heading"><span class="tocnumber">1.1.1.1.1.1</span> <span class="toctext">Level 6 Heading</span></a></li>
15309 <li class="toclevel-6 tocsection-7"><a href="#.3D_Level_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">= Level 7 Heading=</span></a></li>
15310 <li class="toclevel-6 tocsection-8"><a href="#.3D.3D_Level_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">== Level 8 Heading==</span></a></li>
15311 <li class="toclevel-6 tocsection-9"><a href="#.3D.3D.3D_Level_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">=== Level 9 Heading===</span></a></li>
15312 <li class="toclevel-6 tocsection-10"><a href="#.3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.5</span> <span class="toctext">==== Level 10 Heading====</span></a></li>
15326 <h1><span class="mw-headline" id="Level_1_Heading">Level 1 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
15327 <h2><span class="mw-headline" id="Level_2_Heading">Level 2 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15328 <h3><span class="mw-headline" id="Level_3_Heading">Level 3 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15329 <h4><span class="mw-headline" id="Level_4_Heading">Level 4 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
15330 <h5><span class="mw-headline" id="Level_5_Heading">Level 5 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
15331 <h6><span class="mw-headline" id="Level_6_Heading">Level 6 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
15332 <h6><span class="mw-headline" id=".3D_Level_7_Heading.3D">= Level 7 Heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
15333 <h6><span class="mw-headline" id=".3D.3D_Level_8_Heading.3D.3D">== Level 8 Heading==</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
15334 <h6><span class="mw-headline" id=".3D.3D.3D_Level_9_Heading.3D.3D.3D">=== Level 9 Heading===</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
15335 <h6><span class="mw-headline" id=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D">==== Level 10 Heading====</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
15340 TOC regression (T11764)
15344 ==== title 1.1.1 ====
15349 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15351 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15353 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a>
15355 <li class="toclevel-3 tocsection-3"><a href="#title_1.1.1"><span class="tocnumber">1.1.1</span> <span class="toctext">title 1.1.1</span></a></li>
15358 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
15361 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15363 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
15369 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15370 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15371 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
15372 <h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15373 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15374 <h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15379 TOC for heading containing <span id="..."></span> (T96153)
15382 ==<span id="old-anchor"></span>New title==
15384 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15386 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15390 <h2><span class="mw-headline" id="New_title"><span id="old-anchor"></span>New title</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: New title">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15395 TOC with wgMaxTocLevel=3 (bug 6204)
15401 ==== title 1.1.1 ====
15406 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15408 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15410 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
15411 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
15414 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15416 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
15422 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15423 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15424 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
15425 <h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15426 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15427 <h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15432 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15438 ====Section 1.1.1====
15439 ====Section 1.1.1.1====
15442 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15444 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15446 <li class="toclevel-2 tocsection-2"><a href="#Section_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Section 1.1</span></a></li>
15449 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15453 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15454 <h3><span class="mw-headline" id="Section_1.1">Section 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15455 <h4><span class="mw-headline" id="Section_1.1.1">Section 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
15456 <h4><span class="mw-headline" id="Section_1.1.1.1">Section 1.1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 1.1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
15457 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15463 Resolving duplicate section names
15468 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15469 <h2><span class="mw-headline" id="Foo_bar_2">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15474 Resolving duplicate section names with differing case (bug 10721)
15479 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15480 <h2><span class="mw-headline" id="Foo_Bar_2">Foo Bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15492 Template with sections, __NOTOC__
15499 <h2><span class="mw-headline" id="Section_0">Section 0</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 0">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15500 <h3><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Sections&action=edit&section=T-1" title="Template:Sections">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15501 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Sections&action=edit&section=T-2" title="Template:Sections">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15502 <h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15507 __NOEDITSECTION__ keyword
15513 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15514 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15519 Link inside a section heading
15521 ==Section with a [[Main Page|link]] in it==
15523 <h2><span class="mw-headline" id="Section_with_a_link_in_it">Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section with a link in it">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15528 TOC regression (T14077)
15535 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15537 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15539 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
15542 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15546 <h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15547 <h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
15548 <h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15553 BUG 1219 URL next to image (good)
15555 http://example.com [[File:Foobar.jpg]]
15557 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15560 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> <span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
15564 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15567 The line above must have a trailing space!
15570 But just in case it doesn't...
15572 <h1><span class="mw-headline" id=".3D">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
15573 <p>The line above must have a trailing space!
15575 <h1><span class="mw-headline" id=".3D_2">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
15576 <p>But just in case it doesn't...
15581 Header with special characters (bug 25462)
15583 The tooltips shall not show entities to the user (ie. be double escaped)
15600 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15602 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15604 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15605 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15606 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15607 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15608 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15612 <h2><span class="mw-headline" id="text_.3E_text">text > text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: text > text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15615 <h2><span class="mw-headline" id="text_.3C_text">text < text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: text < text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15618 <h2><span class="mw-headline" id="text_.26_text">text & text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: text & text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15621 <h2><span class="mw-headline" id="text_.27_text">text ' text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: text ' text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15624 <h2><span class="mw-headline" id="text_.22_text">text " text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: text " text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15630 Header with space, plus and underscore as entity
15632 Id should not contain + for spaces
15634 == Space between Text ==
15637 == Space-Entity between Text ==
15640 == Plus+between+Text ==
15643 == Plus-Entity+between+Text ==
15646 == Underscore_between_Text ==
15649 == Underscore-Entity_between_Text ==
15652 [[#Space between Text]]
15653 [[#Space-Entity between Text]]
15654 [[#Plus+between+Text]]
15655 [[#Plus-Entity+between+Text]]
15656 [[#Underscore_between_Text]]
15657 [[#Underscore-Entity_between_Text]]
15659 <p>Id should not contain + for spaces
15661 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15663 <li class="toclevel-1 tocsection-1"><a href="#Space_between_Text"><span class="tocnumber">1</span> <span class="toctext">Space between Text</span></a></li>
15664 <li class="toclevel-1 tocsection-2"><a href="#Space-Entity_between_Text"><span class="tocnumber">2</span> <span class="toctext">Space-Entity between Text</span></a></li>
15665 <li class="toclevel-1 tocsection-3"><a href="#Plus.2Bbetween.2BText"><span class="tocnumber">3</span> <span class="toctext">Plus+between+Text</span></a></li>
15666 <li class="toclevel-1 tocsection-4"><a href="#Plus-Entity.2Bbetween.2BText"><span class="tocnumber">4</span> <span class="toctext">Plus-Entity+between+Text</span></a></li>
15667 <li class="toclevel-1 tocsection-5"><a href="#Underscore_between_Text"><span class="tocnumber">5</span> <span class="toctext">Underscore_between_Text</span></a></li>
15668 <li class="toclevel-1 tocsection-6"><a href="#Underscore-Entity_between_Text"><span class="tocnumber">6</span> <span class="toctext">Underscore-Entity_between_Text</span></a></li>
15672 <h2><span class="mw-headline" id="Space_between_Text">Space between Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Space between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15675 <h2><span class="mw-headline" id="Space-Entity_between_Text">Space-Entity between Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Space-Entity between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15678 <h2><span class="mw-headline" id="Plus.2Bbetween.2BText">Plus+between+Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Plus+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15681 <h2><span class="mw-headline" id="Plus-Entity.2Bbetween.2BText">Plus-Entity+between+Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Plus-Entity+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15684 <h2><span class="mw-headline" id="Underscore_between_Text">Underscore_between_Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Underscore between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15687 <h2><span class="mw-headline" id="Underscore-Entity_between_Text">Underscore-Entity_between_Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Underscore-Entity_between_Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15689 </p><p><a href="#Space_between_Text">#Space between Text</a>
15690 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15691 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15692 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15693 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15694 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15699 Headers with excess '=' characters
15700 (Are similar tests necessary beyond the 1st level?)
15704 =''italic'' heading==
15705 ==''italic'' heading=
15707 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15709 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15710 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15711 <li class="toclevel-1 tocsection-3"><a href="#italic_heading.3D"><span class="tocnumber">3</span> <span class="toctext"><i>italic</i> heading=</span></a></li>
15712 <li class="toclevel-1 tocsection-4"><a href="#.3Ditalic_heading"><span class="tocnumber">4</span> <span class="toctext">=<i>italic</i> heading</span></a></li>
15716 <h1><span class="mw-headline" id="foo.3D">foo=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: foo=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
15717 <h1><span class="mw-headline" id=".3Dfoo">=foo</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =foo">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
15718 <h1><span class="mw-headline" id="italic_heading.3D"><i>italic</i> heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: italic heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
15719 <h1><span class="mw-headline" id=".3Ditalic_heading">=<i>italic</i> heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: =italic heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
15724 HTML headers vs TOC (bug 23393)
15725 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15737 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15739 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15741 <li class="toclevel-2 tocsection-1"><a href="#Header_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Header 1.1</span></a></li>
15742 <li class="toclevel-2 tocsection-2"><a href="#Header_1.2"><span class="tocnumber">1.2</span> <span class="toctext">Header 1.2</span></a></li>
15745 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15747 <li class="toclevel-2 tocsection-3"><a href="#Header_2.1"><span class="tocnumber">2.1</span> <span class="toctext">Header 2.1</span></a></li>
15748 <li class="toclevel-2 tocsection-4"><a href="#Header_2.2"><span class="tocnumber">2.2</span> <span class="toctext">Header 2.2</span></a></li>
15754 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15755 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15756 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15757 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15758 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15759 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15764 Single-line or multiline-comments can follow headings
15766 parsoid=wt2html,wt2wt
15774 <h2><span class="mw-headline" id="foo">foo</span></h2>
15775 <h2><span class="mw-headline" id="bar">bar</span></h2>
15776 <h2><span class="mw-headline" id="baz">baz</span></h2>
15781 BUG 1219 URL next to image (broken)
15783 http://example.com[[File:Foobar.jpg]]
15785 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
15788 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
15792 Bug 1186 news: in the middle of text
15794 http://en.wikinews.org/wiki/Wikinews:Workplace
15796 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15802 Namespaced link must have a title
15811 Namespaced link must have a title (bad fragment version)
15813 [[Project:#fragment]]
15815 <p>[[Project:#fragment]]
15821 ### HTML tags and HTML attributes
15825 div with no attributes
15827 <div>HTML rocks</div>
15829 <div>HTML rocks</div>
15834 div with double-quoted attribute
15836 <div id="rock">HTML rocks</div>
15838 <div id="rock">HTML rocks</div>
15843 div with single-quoted attribute
15845 <div id='rock'>HTML rocks</div>
15847 <div id="rock">HTML rocks</div>
15852 div with unquoted attribute
15854 <div id=rock>HTML rocks</div>
15856 <div id="rock">HTML rocks</div>
15861 div with illegal double attributes
15863 <div id="a" id="b">HTML rocks</div>
15865 <div id="b">HTML rocks</div>
15870 div with empty attribute value, space before equals
15872 parsoid=wt2html,html2html
15874 <div class =>HTML rocks</div>
15876 <div class="">HTML rocks</div>
15879 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15883 div with multiple empty attribute values
15885 parsoid=wt2html,html2html
15887 <div id= title=>HTML rocks</div>
15889 <div id="title.3D">HTML rocks</div>
15892 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15896 table with multiple empty attribute values
15898 parsoid=wt2html,html2html
15904 <table title="id=">
15910 <table title="id=">
15911 <tbody><tr><td> hi</td></tr>
15916 div with braces in attribute value
15918 <div title="{}">Foo</div>
15920 <div title="{}">Foo</div>
15923 <div title="{}">Foo</div>
15927 div with empty attribute value, no space before equals
15929 parsoid=wt2html,html2html
15931 <div class=>HTML rocks</div>
15933 <div class="">HTML rocks</div>
15936 <div class="">HTML rocks</div>
15940 HTML multiple attributes correction
15942 <p class="error" class="awesome">Awesome!</p>
15944 <p class="awesome">Awesome!</p>
15949 Table multiple attributes correction
15952 !+ class="error" class="awesome"| status
15957 <th class="awesome"> status
15965 <DIV ID="x">HTML ROCKS</DIV>
15967 <div id="x">HTML ROCKS</div>
15972 Non-ASCII pseudo-tags are rendered as text
15981 Pseudo-tag with URL 'name' renders as url link
15983 <http://example.com/>
15985 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15990 text with amp in the middle of nowhere
15994 <p>Remember AT&T?
15999 text with character entity: eacute
16001 I always thought é was a cute letter.
16003 <p>I always thought é was a cute letter.
16006 <p>I always thought é was a cute letter.</p>
16010 text with entity-escaped character entity-like string: eacute
16012 I always thought &eacute; was a cute letter.
16014 <p>I always thought &eacute; was a cute letter.
16019 text with undefined character entity: xacute
16021 I always thought &xacute; was a cute letter.
16023 <p>I always thought &xacute; was a cute letter.
16030 <data value="5">five</data>
16031 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16032 <mark>This highlighted text</mark>
16034 <p><data value="5">five</data>
16035 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16036 <mark>This highlighted text</mark>
16041 HTML tag with leading space is parsed as text
16045 <p>< div>foo< /div>
16050 ### Nesting tests (see bug 41545, 50604, 51081)
16053 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
16054 # Note that html2wt is considerably more difficult if we use <b> in
16055 # the test case, instead of <big>
16057 Ensure that HTML adoption agency algorithm is properly implemented.
16059 <big>X<big>Y</big>Z</big>
16061 <p><big>X<big>Y</big>Z</big>
16065 # This was bug 41545 in the PHP parser.
16066 # Note that tidy doesn't handle this correctly.
16070 <kbd>X<kbd>Y</kbd>Z</kbd>
16072 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16076 # The following cases were bug 51081 in the PHP parser.
16077 # Note that there are some other nestable tags (b, i, etc) which are
16078 # not covered; see bug 51081 for discussion.
16080 # Note that tidy doesn't handle this correctly.
16084 <em>X<em>Y</em>Z</em>
16086 <p><em>X<em>Y</em>Z</em>
16090 # Note that tidy doesn't handle this correctly.
16092 Nesting of <strong>
16094 <strong>X<strong>Y</strong>Z</strong>
16096 <p><strong>X<strong>Y</strong>Z</strong>
16105 <p><q>X<q>Y</q>Z</q></p>
16108 # Note that tidy doesn't handle this correctly.
16112 <ruby>X<ruby>Y</ruby>Z</ruby>
16114 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16118 # Note that tidy doesn't handle this correctly.
16122 <bdo>X<bdo>Y</bdo>Z</bdo>
16124 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16136 [[Media:Foobar.jpg]]
16138 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16143 Media link with text
16145 [[Media:Foobar.jpg|A neat file to look at]]
16147 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16151 # FIXME: this is still bad HTML tag nesting
16152 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16154 Media link with nasty text
16156 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16158 <a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link<div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a>
16161 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16162 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16166 Media link to nonexistent file (bug 1702)
16168 [[Media:No such.jpg]]
16170 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16175 Image link to nonexistent file (bug 1850 - good)
16177 [[File:No_such.jpg]]
16179 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16182 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:No_such.jpg"><img resource="./File:No_such.jpg" src="./Special:FilePath/No_such.jpg" height="220" width="220"/></a></span></p>
16186 :Image link to nonexistent file (bug 1850 - bad)
16188 [[:Image:No such.jpg]]
16190 <p><a href="/index.php?title=File:No_such.jpg&action=edit&redlink=1" class="new" title="File:No such.jpg (page does not exist)">Image:No such.jpg</a>
16193 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16199 Character reference normalization in link text (bug 1938)
16201 [[Main Page|this&that]]
16203 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16210 Test for unicode normalization
16212 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16216 (bug 19451) Links should refer to the normalized form.
16224 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16225 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16226 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16227 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16228 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16233 Empty attribute crash test (bug 2067)
16235 <font color="">foo</font>
16237 <p><font color="">foo</font>
16242 Empty attribute crash test single-quotes (bug 2067)
16244 <font color=''>foo</font>
16246 <p><font color="">foo</font>
16251 Attribute test: equals, then nothing
16253 parsoid=wt2html,html2html
16255 <font color=>foo</font>
16257 <p><font color="">foo</font>
16260 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16264 Attribute test: unquoted value
16266 parsoid=wt2html,html2html
16268 <font color=x>foo</font>
16270 <p><font color="x">foo</font>
16273 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16277 Attribute test: unquoted but illegal value (hash)
16279 <font color=#x>foo</font>
16281 <p><font color="#x">foo</font>
16285 # Parsoid does not serialize to empty attribute syntax,
16286 # so wt2wt and html2wt cases are skipped
16288 Attribute test: no value (T54330)
16290 parsoid=wt2html,html2html
16292 <font color>foo</font>
16294 <p><font color="">foo</font>
16297 <p><font color="">foo</font></p>
16301 Bug 2095: link with three closing brackets
16305 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16308 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16312 Bug 2095: link with pipe and three closing brackets
16314 [[Main Page|link]]]
16316 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16319 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16323 Bug 2095: link with pipe and three closing brackets, version 2
16325 [[Main Page|[http://example.com/]]]
16327 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16330 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16339 Template:Dangerous attribute
16341 " onmouseover="alert(document.cookie)
16345 Template:Dangerous style attribute
16347 border-size: expression(alert(document.cookie))
16353 <div style="float: right; {{{1}}}">Magic div</div>
16357 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16359 <div title="{{test}}"></div>
16361 <div title="This is a test template"></div>
16365 # Parsoid has enough context to handle this case
16367 Bug 2304: HTML attribute safety (dangerous template; 2309)
16369 <div title="{{dangerous attribute}}"></div>
16371 <div title=""></div>
16374 <div title='" onmouseover="alert(document.cookie)' about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"\" onmouseover=\"alert(document.cookie)"},"sa":{"title":"{{dangerous attribute}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous attribute\",\"href\":\"./Template:Dangerous_attribute\"},\"params\":{},\"i\":0}}]}'>\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
16378 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16380 <div style="{{dangerous style attribute}}"></div>
16382 <div style="/* insecure input */"></div>
16387 Bug 2304: HTML attribute safety (safe parameter; 2309)
16389 {{div style|width: 200px}}
16391 <div style="float: right; width: 200px">Magic div</div>
16396 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16398 {{div style|width: expression(alert(document.cookie))}}
16400 <div style="/* insecure input */">Magic div</div>
16405 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16407 {{div style|"><script>alert(document.cookie)</script>}}
16409 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16414 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16416 {{div style|" ><script>alert(document.cookie)</script>}}
16418 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16423 Bug 2304: HTML attribute safety (link)
16425 <div title="[[Main Page]]"></div>
16427 <div title="[[Main Page]]"></div>
16432 Bug 2304: HTML attribute safety (italics)
16434 <div title="''foobar''"></div>
16436 <div title="''foobar''"></div>
16441 Bug 2304: HTML attribute safety (bold)
16443 <div title="'''foobar'''"></div>
16445 <div title="'''foobar'''"></div>
16451 Bug 2304: HTML attribute safety (ISBN)
16453 <div title="ISBN 1234567890"></div>
16455 <div title="ISBN 1234567890"></div>
16460 Bug 2304: HTML attribute safety (RFC)
16462 <div title="RFC 1234"></div>
16464 <div title="RFC 1234"></div>
16469 Bug 2304: HTML attribute safety (PMID)
16471 <div title="PMID 1234567890"></div>
16473 <div title="PMID 1234567890"></div>
16478 Bug 2304: HTML attribute safety (web link)
16480 <div title="http://example.com/"></div>
16482 <div title="http://example.com/"></div>
16487 Bug 2304: HTML attribute safety (named web link)
16489 <div title="[http://example.com/ link]"></div>
16491 <div title="[http://example.com/ link]"></div>
16496 Bug 3244: HTML attribute safety (extension; safe)
16498 <div style="<nowiki>background:blue</nowiki>"></div>
16500 <div style="background:blue"></div>
16505 Bug 3244: HTML attribute safety (extension; unsafe)
16507 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16509 <div style="/* insecure input */"></div>
16513 # More MSIE fun discovered by Tom Gilder
16516 MSIE CSS safety test: spurious slash
16518 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16520 <div style="/* insecure input */">evil</div>
16525 MSIE CSS safety test: hex code
16527 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16529 <div style="/* insecure input */">evil</div>
16534 MSIE CSS safety test: comment in url
16536 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16538 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16543 MSIE CSS safety test: comment in expression
16545 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16547 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16552 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16554 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16556 <p style="/* invalid control char */">A</p>
16561 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16563 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16564 <div style="top:EXPRESSION(alert())">B</div>
16566 <p style="/* insecure input */">A</p>
16567 <div style="/* insecure input */">B</div>
16572 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16574 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16575 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16577 <div style="/* insecure input */">A</div>
16578 <p style="/* insecure input */">B</p>
16583 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16585 <div style="background-image:url⁽javascript:alert())">A</div>
16586 <div style="background-image:url₍javascript:alert())">B</div>
16587 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16589 <div style="/* insecure input */">A</div>
16590 <div style="/* insecure input */">B</div>
16591 <p style="/* insecure input */">C</p>
16595 # FIXME: Parsoid fails to sanitize this! See T58846.
16600 title="data:text/html,<img src=1 onerror=alert(1)>"
16601 style="-o-link:attr(title);-o-link-source:current">X</div>
16603 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16608 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16610 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16611 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16612 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16613 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16614 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16615 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16616 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16618 <p style="/* insecure input */">A</p>
16619 <p style="/* insecure input */">B</p>
16620 <p style="/* insecure input */">C</p>
16621 <p style="/* insecure input */">D</p>
16622 <p style="/* insecure input */">E</p>
16623 <p style="/* insecure input */">F</p>
16624 <p style="/* insecure input */">G</p>
16629 Table attribute legitimate extension
16632 !+ style="<nowiki>color:blue</nowiki>"| status
16637 <th style="color:blue"> status
16643 Table attribute safety
16646 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16651 <th style="/* insecure input */"> status
16657 CSS line continuation 1
16659 <div style="background-image: u\ rl(test.jpg);"></div>
16661 <div style="/* insecure input */"></div>
16666 CSS line continuation 2
16668 <div style="background-image: u\ rl(test.jpg); "></div>
16670 <div style="/* invalid control char */"></div>
16681 Expansion of multi-line templates in attribute values (bug 6255)
16683 <div style="background: {{identity|#00FF00}}">-</div>
16685 <div style="background: #00FF00">-</div>
16691 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16693 <div style="background:
16696 <div style="background: #00FF00">-</div>
16699 <div style="background:
16704 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16706 <div style="background: #00FF00">-</div>
16708 <div style="background: #00FF00">-</div>
16713 Tags which are hidden from Tidy cannot pass through the Sanitizer
16715 <mw:toc><script>alert();</script></mw:toc>
16717 <p><mw:toc><script>alert();</script></mw:toc></p>
16721 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16724 Parser hook: empty input
16735 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16738 ## Don't expect parsoid to rt this form.
16740 Parser hook: empty input using terminated empty elements
16742 parsoid=wt2html,html2html
16753 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16757 Parser hook: empty input using terminated empty elements (space before)
16768 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16772 Parser hook: basic input
16783 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16786 ## Don't expect parsoid to rt this form.
16788 Parser hook: case insensitive
16790 parsoid=wt2html,html2html
16801 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16804 ## Don't expect parsoid to rt this form.
16806 Parser hook: case insensitive, redux
16808 parsoid=wt2html,html2html
16819 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16823 Parser hook: nested tags
16825 <tag><tag></tag></tag>
16834 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16838 Parser hook: basic arguments
16840 <tag width="200" height="100" depth="50" square=""></tag>
16853 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16856 ## Don't expect parsoid to rt this form.
16858 Parser hook: basic arguments, variations
16860 parsoid=wt2html,html2html
16862 <tag width=200 height = "100" depth = '50' square></tag>
16875 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16879 Parser hook: argument containing a forward slash (bug 5344)
16881 <tag filename="/tmp/bla"></tag>
16886 'filename' => '/tmp/bla',
16891 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16894 ## Don't expect parsoid to rt this form.
16896 Parser hook: empty input using terminated empty elements (bug 2374)
16898 parsoid=wt2html,html2html
16910 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16913 ## </tag> should be output literally since there is no matching tag that begins it
16914 ## Don't expect parsoid to rt this form.
16916 Parser hook: basic arguments using terminated empty elements (bug 2374)
16920 <tag width=200 height = "100" depth = '50' square/>
16937 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":null}' about="#mwt2"></pre><p>other stuff
16941 ## Don't expect parsoid to rt this form.
16943 Parser hook: Don't allow unclosed extension tags
16949 this is a '''test'''
16951 <p>test <tag>123
16952 </p><p>this is a <b>test</b>
16955 <p>test <tag>123</p>
16957 <p>this is a <b>test</b></p>
16961 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16965 Parser hook: static parser hook not inside a comment
16967 <statictag>hello, world</statictag>
16969 <statictag action="flush" />
16975 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16976 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16980 Parser hook: static parser hook inside a comment
16982 <!-- <statictag>hello, world</statictag> -->
16983 <statictag action="flush" />
16988 <!-- <statictag>hello, world</statictag> -->
16989 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
16992 # Nested template calls; this case was broken by Parser.php rev 1.506,
16996 Template:One-parameter
16998 (My parameter is: {{{1}}})
17002 Template:Map-one-parameter
17004 {{{{{1}}}|{{{2}}}}}
17008 Nested template calls
17010 {{Map-one-parameter|One-parameter|param}}
17012 <p>(My parameter is: param)
17021 # HTML+Tidy effectively strips out the empty tags completely
17022 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17023 # which Tidy would have done for the PHP parser had there been content inside it.
17025 Sanitizer: Closing of open tags
17027 <s></s><table></table>
17029 <s></s><table></table>
17032 <p><s></s></p><table></table>
17036 Sanitizer: Closing of open but not closed tags
17045 Sanitizer: Closing of closed but not open tags
17055 Sanitizer: Closing of closed but not open table tags
17059 Table not started</td></tr></table>
17061 <p>Table not started</p>
17063 <p>Table not started</p>
17067 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17069 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17071 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17075 # In HTML5, the restrictions are that id must contain at least one character,
17076 # and must not contain any space characters.
17078 Sanitizer: Validating the contents of the id attribute (bug 4515)
17082 <br id="" /><br id="a space" />
17087 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17089 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
17093 <br id="foo" /><br id="foo" />
17095 Something need to be done. foo-2 ?
17099 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17102 <meta itemprop="hello" content="world">
17103 <meta http-equiv="refresh" content="5">
17104 <meta itemprop="hello" http-equiv="refresh" content="5">
17105 <link itemprop="hello" href="{{SERVER}}">
17106 <link rel="stylesheet" href="{{SERVER}}">
17107 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17111 <p> <meta itemprop="hello" content="world" />
17112 <meta http-equiv="refresh" content="5">
17113 <meta itemprop="hello" content="5" />
17115 <link itemprop="hello" href="http://example.org" />
17116 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17117 <link itemprop="hello" href="http://example.org" />
17123 Language converter: output gets cut off unexpectedly (bug 5757)
17127 this bit is safe: }-
17129 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17131 then we get cut off here: }-
17133 all additional text is vanished
17135 <p>this bit is safe: }-
17136 </p><p>but if we add a conversion instance: xxx
17137 </p><p>then we get cut off here: }-
17138 </p><p>all additional text is vanished
17143 Self closed html pairs (bug 5487)
17146 <center><font id="bug" />Centered text</center>
17147 <div><font id="bug2" />In div text</div>
17149 <center><font id="bug" />Centered text</center>
17150 <div><font id="bug2" />In div text</div>
17159 Punctuation: nbsp before exclamation
17163 <p>C'est grave !
17168 Punctuation: CSS !important (bug 11874)
17170 <div style="width:50% !important">important</div>
17172 <div style="width:50% !important">important</div>
17177 Punctuation: CSS ! important (bug 11874; with space after)
17179 <div style="width:50% ! important">important</div>
17181 <div style="width:50% ! important">important</div>
17186 HTML bullet list, closed tags (bug 5497)
17199 <ul data-parsoid='{"stx":"html"}'>
17200 <li data-parsoid='{"stx":"html"}'>One</li>
17201 <li data-parsoid='{"stx":"html"}'>Two</li>
17207 HTML bullet list, unclosed tags (bug 5497)
17219 <ul data-parsoid='{"stx":"html"}'>
17220 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17221 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17227 HTML ordered list, closed tags (bug 5497)
17240 <ol data-parsoid='{"stx":"html"}'>
17241 <li data-parsoid='{"stx":"html"}'>One</li>
17242 <li data-parsoid='{"stx":"html"}'>Two</li>
17248 HTML ordered list, unclosed tags (bug 5497)
17261 <ol data-parsoid='{"stx":"html"}'>
17262 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17263 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17269 HTML nested bullet list, closed tags (bug 5497)
17292 <ul data-parsoid='{"stx":"html"}'>
17293 <li data-parsoid='{"stx":"html"}'>One</li>
17294 <li data-parsoid='{"stx":"html"}'>Two:
17295 <ul data-parsoid='{"stx":"html"}'>
17296 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17297 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17304 HTML nested bullet list, open tags (bug 5497)
17341 HTML nested ordered list, closed tags (bug 5497)
17366 HTML nested ordered list, open tags (bug 5497)
17403 HTML ordered list item with parameters oddity
17405 <ol><li id="fragment">One</li>
17408 <ol><li id="fragment">One</li>
17413 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17415 bug 5918: autonumbering
17417 [http://first/] [http://second] [ftp://ftp]
17421 [mailto:enclosed@mail.tld With target]
17423 [mailto:enclosed@mail.tld]
17425 mailto:inline@mail.tld
17427 <p><a rel="nofollow" class="external autonumber" href="http://first/">[1]</a> <a rel="nofollow" class="external autonumber" href="http://second">[2]</a> <a rel="nofollow" class="external autonumber" href="ftp://ftp">[3]</a>
17428 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17429 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17430 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17431 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17434 <p><a rel="mw:ExtLink" href="http://first/"></a> <a rel="mw:ExtLink" href="http://second"></a> <a rel="mw:ExtLink" href="ftp://ftp"></a></p>
17435 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17436 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17437 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17438 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17443 # Security and HTML correctness
17444 # From Nick Jenkins' fuzz testing
17448 Fuzz testing: Parser13
17463 Fuzz testing: Parser14
17468 <h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17469 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17471 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17477 <h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17479 <div id="toc" class="toc">
17480 <div id="toctitle">
17484 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17491 Fuzz testing: Parser14-table
17493 parsoid=wt2html,html2html
17498 <h2><span class="mw-headline" id="a">a</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17499 <table style="__TOC__">
17504 <h2><span class="mw-headline" id="a">a</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17505 <table style="__TOC__">
17512 <table style="__TOC__"></table>
17515 # Known to produce bogus xml (extra </td>)
17517 Fuzz testing: Parser16
17544 Fuzz testing: Parser21
17547 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17552 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17562 Fuzz testing: Parser22
17564 http://===r:::https://b
17568 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17576 # Known to produce bad XML for now
17578 Fuzz testing: Parser24
17583 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17584 <br style="onmouseover='alert(document.cookie);' " />
17586 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17591 <u class="|">}}}} >
17592 <br style="onmouseover='alert(document.cookie);'" />
17594 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17603 # Note: the current result listed for this is not what the original one was,
17604 # but the original bug was JavaScript injection, which is fixed in any case.
17605 # It's not clear that the original result listed was any more correct than the
17606 # current one. Original result:
17609 # <li class="||">
17610 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17612 Fuzz testing: Parser25 (bug 6055)
17618 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17620 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17625 Fuzz testing: URL adjacent extension (with space, clean)
17627 http://example.com <nowiki>junk</nowiki>
17629 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17632 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17636 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17638 http://example.com<nowiki>junk</nowiki>
17640 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17643 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17647 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17649 http://example.com<pre>junk</pre>
17651 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17654 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17659 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre data-parsoid='{"stx":"html"}'>junk</pre>
17663 Fuzz testing: image with bogus manual thumbnail
17665 [[Image:foobar.jpg|thumbnail= ]]
17667 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17670 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"errors":[{"key":"missing-thumbnail","message":"This thumbnail does not exist.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
17674 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17676 <pre dir=" "></pre>
17678 <pre dir=" "></pre>
17683 Parsing optional HTML elements (Bug 6171)
17688 <td> Some tabular data</td>
17689 <td> More tabular data ...
17690 <td> And yet som tabular data</td>
17696 <td> Some tabular data</td>
17697 <td> More tabular data ...
17698 </td><td> And yet som tabular data</td>
17705 Correct handling of <td>, <tr> (Bug 6171)
17710 <td> Some tabular data</td>
17711 <td> More tabular data ...</td>
17712 <td> And yet som tabular data</td>
17718 <td> Some tabular data</td>
17719 <td> More tabular data ...</td>
17720 <td> And yet som tabular data</td>
17728 Parsing crashing regression (fr:JavaScript)
17732 <p></body></x>
17737 Inline wiki vs wiki block nesting
17743 <p><b>Bold paragraph</b>
17744 </p><p>New wiki paragraph
17748 # FIXME: The current php output is documented
17749 # and desired output is the parsoid target.
17751 Inline HTML vs wiki block nesting
17757 <p><b>Bold paragraph
17758 </p><p>New wiki paragraph</b>
17761 <p><b>Bold paragraph</b>
17762 </p><p>New wiki paragraph
17766 # Original result was this:
17767 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17769 # While that might be marginally more intuitive, maybe, the six-apostrophe
17770 # construct is clearly pathological and the result stated here (which is what
17771 # the parser actually does) is about as reasonable as anything.
17773 Mixing markup for italics and bold
17776 '''bold''''''bold''bolditalics'''''
17778 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17786 Article for special page transclusion test
17790 Special page transclusion
17793 {{Special:Prefixindex/Xyzzyx}}
17795 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17801 Special page transclusion twice (bug 5021)
17804 {{Special:Prefixindex/Xyzzyx}}
17805 {{Special:Prefixindex/Xyzzyx}}
17807 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17809 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17815 Transclusion of default MediaWiki message
17817 {{MediaWiki:Mainpage}}
17824 Transclusion of nonexistent MediaWiki message
17826 {{MediaWiki:Mainpagexxx}}
17828 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17833 Transclusion of MediaWiki message with underscore
17835 {{MediaWiki:history_short}}
17842 Transclusion of MediaWiki message with space
17844 {{MediaWiki:history short}}
17851 Invalid header with following text
17861 Section extraction test (section 0)
17881 Section extraction test (section 1)
17903 Section extraction test (section 2)
17924 Section extraction test (section 3)
17944 Section extraction test (section 4)
17968 Section extraction test (section 5)
17988 Section extraction test (section 6)
18009 Section extraction test (section 7)
18029 Section extraction test (section 8)
18049 Section extraction test (section 9)
18070 Section extraction test (section 10)
18090 Section extraction test (nonexistent section 11)
18109 Section extraction test with bogus heading (section 1)
18114 ==bogus== not a legal section
18118 ==bogus== not a legal section
18122 Section extraction test with bogus heading (section 2)
18127 ==bogus== not a legal section
18134 Section extraction test with comment after heading (section 1)
18146 Section extraction test with comment after heading (section 2)
18158 Section extraction test with bogus <nowiki> heading (section 1)
18163 ==bogus== <nowiki>not a legal section</nowiki>
18167 ==bogus== <nowiki>not a legal section</nowiki>
18171 Section extraction test with bogus <nowiki> heading (section 2)
18176 ==bogus== <nowiki>not a legal section</nowiki>
18182 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18183 # instead of respecting commented sections
18185 Section extraction prefixed by comment (section 1)
18196 Section extraction prefixed by comment (section 2)
18206 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18207 # instead of respecting HTML-style headings
18209 Section extraction, mixed wiki and html (section 1)
18225 Section extraction, mixed wiki and html (section 2)
18241 # Formerly testing for bug 3342
18243 Section extraction, heading surrounded by <noinclude>
18247 <noinclude>==unmarked==</noinclude>
18253 # Test behavior of bug 19910
18255 Sectiion with all-equals
18260 The line above must have a trailing space
18263 But just in case it doesn't...
18267 But just in case it doesn't...
18271 Section replacement test (section 0)
18302 Section replacement test (section 1)
18331 Section replacement test (section 2)
18361 Section replacement test (section 3)
18392 Section replacement test (section 4)
18419 Section replacement test (section 5)
18450 Section replacement test (section 6)
18480 Section replacement test (section 7)
18511 Section replacement test (section 8)
18542 Section replacement test (section 9)
18571 Section replacement test (section 10)
18601 Section replacement test with initial whitespace (bug 13728)
18605 Preformatted initial line
18609 Preformatted initial line
18616 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18628 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18641 Section extraction, <pre> around bogus header (bug 10309)
18658 Section replacement, <pre> around bogus header (bug 10309)
18680 Handling of 
 in URLs
18684 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18687 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18689 a</a></li></ul></li></ul>
18693 Handling of %0A in URLs
18697 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18700 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18704 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18706 5 quotes, code coverage +1 line
18713 <p><b><i></i></b></p>
18716 # same html as previous, but wikitext adjusted to match parsoid html2wt
18717 # note that wt2html and html2html will put the <i> before the <b>
18719 5 quotes, code coverage +1 line w/ nowiki (1)
18721 parsoid=wt2wt,html2wt
18723 '''''<nowiki/>'''''
18728 <p><b><i></i></b></p>
18731 # same as previous, just swapping the <i> and <b>
18733 5 quotes, code coverage +1 line w/ nowiki (2)
18735 '''''<nowiki/>'''''
18740 <p><i><b></b></i></p>
18744 Special:Search page linking.
18748 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18753 {{!}} is a magic word
18755 {{!}} is a magic word there and {{!}} is still a magic word here
18756 | is not a magic word here but {{!}} is still a magic word here
18758 <p>| is a magic word there and | is still a magic word here
18759 | is not a magic word here but | is still a magic word here
18762 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
18763 | is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
18770 title=[[Parser test]]
18775 * {{FULLPAGENAMEE}}
18777 * {{BASEPAGENAMEE}}
18781 * {{ROOTPAGENAMEE}}
18783 * {{TALKPAGENAMEE}}
18784 * {{SUBJECTPAGENAME}}
18785 * {{SUBJECTPAGENAMEE}}
18788 * {{NAMESPACENUMBER}}
18792 * {{SUBJECTSPACEE}}
18793 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18795 <ul><li> Parser test</li>
18796 <li> Parser_test</li>
18797 <li> Parser test</li>
18798 <li> Parser_test</li>
18799 <li> Parser test</li>
18800 <li> Parser_test</li>
18801 <li> Parser test</li>
18802 <li> Parser_test</li>
18803 <li> Parser test</li>
18804 <li> Parser_test</li>
18805 <li> Talk:Parser test</li>
18806 <li> Talk:Parser_test</li>
18807 <li> Parser test</li>
18808 <li> Parser_test</li>
18816 <li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a></li></ul>
18819 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18829 image4 |300px| centre
18830 image5.svg| http://///////
18835 <ul class="gallery mw-gallery-traditional">
18836 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18837 <div class="thumb" style="height: 150px;">Image1.png</div>
18838 <div class="gallerytext">
18841 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18842 <div class="thumb" style="height: 150px;">Image2.gif</div>
18843 <div class="gallerytext">
18846 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18847 <div class="thumb" style="height: 150px;">Image3</div>
18848 <div class="gallerytext">
18851 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18852 <div class="thumb" style="height: 150px;">Image4</div>
18853 <div class="gallerytext">
18858 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18859 <div class="thumb" style="height: 150px;">Image5.svg</div>
18860 <div class="gallerytext">
18861 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18865 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18866 <div class="thumb" style="height: 150px;">* image6</div>
18867 <div class="gallerytext">
18875 Gallery (with options)
18877 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18878 File:Nonexistent.jpg|caption
18879 File:Nonexistent.jpg
18880 image:foobar.jpg|some '''caption''' [[Main Page]]
18882 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18885 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18886 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18887 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18888 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18889 <div class="gallerytext">
18894 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18895 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18896 <div class="gallerytext">
18899 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18900 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
18901 <div class="gallerytext">
18902 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18906 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18907 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
18908 <div class="gallerytext">
18911 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18912 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
18913 <div class="gallerytext">
18923 Gallery with link that has fragment
18926 image:foobar.jpg|link=Main_Page
18927 image:foobar.jpg|link=Main_Page#section
18928 image:foobar.jpg|link=Main Page#section|caption
18931 <ul class="gallery mw-gallery-traditional">
18932 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18933 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
18934 <div class="gallerytext">
18937 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18938 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
18939 <div class="gallerytext">
18942 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18943 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
18944 <div class="gallerytext">
18954 Gallery with wikitext inside caption
18957 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18958 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18961 <ul class="gallery mw-gallery-traditional">
18962 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18963 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
18964 <div class="gallerytext">
18965 <p><a href="/wiki/File:Foobar.jpg" class="image" title="desc"><img alt="inneralt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
18969 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18970 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
18971 <div class="gallerytext">
18972 <p>This is a test template
18981 gallery (with showfilename option)
18983 <gallery showfilename>
18984 File:Nonexistent.jpg|caption
18985 File:Nonexistent.jpg
18986 image:foobar.jpg|some '''caption''' [[Main Page]]
18990 <ul class="gallery mw-gallery-traditional">
18991 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18992 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18993 <div class="gallerytext">
18994 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
18999 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19000 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19001 <div class="gallerytext">
19002 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19006 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19007 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19008 <div class="gallerytext">
19009 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19010 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19014 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19015 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19016 <div class="gallerytext">
19017 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19026 Gallery (with namespace-less filenames)
19029 File:Nonexistent.jpg
19035 <ul class="gallery mw-gallery-traditional">
19036 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19037 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19038 <div class="gallerytext">
19041 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19042 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19043 <div class="gallerytext">
19046 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19047 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19048 <div class="gallerytext">
19051 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19052 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
19053 <div class="gallerytext">
19061 HTML Hex character encoding (spells the word "JavaScript")
19063 parsoid=wt2html,wt2wt,html2html
19065 JavaScript
19067 <p>JavaScript
19072 <p><span typeof="mw:Entity">J</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">v</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">S</span><span typeof="mw:Entity">c</span><span typeof="mw:Entity">r</span><span typeof="mw:Entity">i</span><span typeof="mw:Entity">p</span><span typeof="mw:Entity">t</span></p>
19076 HTML Hex character encoding bogus encoding (bug 26437 regression check)
19080 <p>&#xsee;&#XSEE;
19083 <p>&#xsee;&#XSEE;</p>
19087 HTML Hex character encoding mixed case
19089 parsoid=wt2html,wt2wt,html2html
19098 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19101 # See: http://www.w3.org/TR/html5/syntax.html#character-references
19102 # Note that U+000C (form feed) is not a valid XML character, so
19103 # it is banned even though allowed in HTML5.
19105 Illegal character references (T106578)
19110 ; Control (low): 
19111 ; Control (high):  Ÿ
19112 ; Surrogate: ��
19113 ; This is an okay astral character: 💩
19122 <dt>Control (low)</dt>
19124 <dt>Control (high)</dt>
19125 <dd>&#x7F; &#x9F;</dd>
19127 <dd>&#xD83D;&#xDCA9;</dd>
19128 <dt>This is an okay astral character</dt>
19134 __FORCETOC__ override
19146 ISBN 978-0-1234-56 789
19148 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19151 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19153 <p><a href="./Special:BookSources/9780123456" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
19157 ISBN followed by 5 spaces
19168 ISBN ISBN 1234567890
19170 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19173 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19176 # Uppercase X and lowercase x as well
19187 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19188 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19189 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19190 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19191 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19192 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19195 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19196 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19197 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19198 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19199 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19200 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19204 ISBN with empty prefix (parsoid test)
19208 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19211 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19215 Bug 22905: <abbr> followed by ISBN followed by </a>
19217 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19219 <p><abbr>(fr)</abbr> <a href="/wiki/Special:BookSources/2753300917" class="internal mw-magiclink-isbn">ISBN 2753300917</a> <a rel="nofollow" class="external text" href="http://www.example.com">example.com</a>
19222 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" href="http://www.example.com">example.com</a></p>
19230 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19235 Double RFC with a wiki link
19239 <p>RFC <a href="/index.php?title=RFC_1234&action=edit&redlink=1" class="new" title="RFC 1234 (page does not exist)">RFC 1234</a>
19248 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19251 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19255 Centre-aligned image
19257 [[Image:foobar.jpg|centre]]
19259 <div class="center"><div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div></div>
19266 [[Image:foobar.jpg|none]]
19268 <div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
19273 Width + Height sized image (using px) (height is ignored)
19275 [[Image:foobar.jpg|640x480px]]
19277 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
19282 Width-sized image (using px, no following whitespace)
19284 [[Image:foobar.jpg|640px]]
19286 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
19291 Width-sized image (using px, with following whitespace - test regression from r39467)
19293 [[Image:foobar.jpg|640px ]]
19295 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
19300 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19302 [[Image:foobar.jpg| 640px]]
19304 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
19309 Image with page parameter
19313 [[File:LoremIpsum.djvu|page=2]]
19315 <p><a href="/index.php?title=File:LoremIpsum.djvu&page=2" class="image"><img alt="LoremIpsum.djvu" src="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-2480px-LoremIpsum.djvu.jpg" width="2480" height="3508" srcset="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-3720px-LoremIpsum.djvu.jpg 1.5x, http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-4960px-LoremIpsum.djvu.jpg 2x" /></a>
19318 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{}}'><img resource="./File:LoremIpsum.djvu" src="//example.com/images/5/5f/LoremIpsum.djvu" data-file-width="2480" data-file-height="3508" data-file-type="bitmap" height="3508" width="2480" data-parsoid='{"a":{"resource":"./File:LoremIpsum.djvu","height":"3508","width":"2480"},"sa":{"resource":"File:LoremIpsum.djvu"}}'/></a></span></p>
19322 Another italics / bold test
19330 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19336 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19339 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19344 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19346 Images with the "|" character in the comment
19348 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19350 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx">external</a> URL</div></div></div>
19353 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" href="http://test/?param1=|left|&param2=|x">external</a> URL</figcaption></figure>
19357 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19359 <html><script>alert(1);</script></html>
19361 <p><html><script>alert(1);</script></html>
19366 HTML with raw HTML ($wgRawHtml==true)
19370 <html><script>alert(1);</script></html>
19372 <p><script>alert(1);</script>
19377 Parents of subpages, one level up
19379 subpage title=[[Subpage test/L1/L2/L3]]
19383 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">L2</a>
19389 Parents of subpages, one level up, not named
19391 subpage title=[[Subpage test/L1/L2/L3]]
19395 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">Subpage test/L1/L2</a>
19402 Parents of subpages, two levels up
19404 subpage title=[[Subpage test/L1/L2/L3]]
19410 <p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1</a>2
19411 </p><p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1l</a>
19416 Parents of subpages, two levels up, without trailing slash or name.
19418 subpage title=[[Subpage test/L1/L2/L3]]
19427 Parents of subpages, two levels up, with lots of extra trailing slashes.
19429 subpage title=[[Subpage test/L1/L2/L3]]
19433 <p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">Subpage test/L1</a>
19438 Subpage test/L1/L2/L3Sibling
19444 Transclusion of a sibling page (one level up)
19446 subpage title=[[Subpage test/L1/L2/L3]]
19455 Transclusion of a child page
19457 subpage title=[[Subpage test/L1/L2]]
19465 # This is wt2html only in Parsoid because we add <nowiki>
19466 # because of {{..}} and we don't expect to fix that to
19467 # eliminate the nowikis selective for {{..}} markup.
19469 Non-transclusion because of too many up levels
19471 subpage title=[[Subpage test/L1/L2/L3]]
19474 {{../../../../More than parent}}
19476 <p>{{../../../../More than parent}}
19479 <p>{{../../../../More than parent}}</p>
19483 Definition list code coverage
19489 <dl><dt> title  </dt>
19491 <dt> title </dt>
19497 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19498 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19499 <dt>title</dt><dd> def</dd></dl>
19503 Don't fall for the self-closing div
19505 <div>hello world</div/>
19507 <div>hello world</div>
19516 <p>[[:Template:Msg]]
19525 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19529 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19531 Always escape literal '>' in output, not just after '<'
19545 <p>This is a test template
19546 This is a test template
19558 Inclusion of !userCanEdit() content
19562 <h2><span class="mw-headline" id="header">header</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=MediaWiki:Fake&action=edit&section=T-1" title="MediaWiki:Fake">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19568 Out-of-order TOC heading levels
19577 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19579 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19581 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19582 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19585 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19587 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19588 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19594 <h2><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19595 <h6><span class="mw-headline" id="6">6</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 6">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
19596 <h3><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 3">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
19597 <h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
19598 <h5><span class="mw-headline" id="5">5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: 5">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
19599 <h2><span class="mw-headline" id="2_2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
19605 ISBN with a dummy number
19615 ISBN with space-delimited number
19619 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19625 ISBN with multiple spaces, no number
19644 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19645 </p><p>ISBN 12345678901
19651 ISBN with trailing year (bug 8110)
19653 ISBN 1-234-56789-0 - 2006
19655 ISBN 1 234 56789 0 - 2006
19657 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19658 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19666 {{anchorencode:foo bar©#%n}}
19668 <p>foo_bar.C2.A9.23.25n
19673 anchorencode trims spaces
19675 {{anchorencode: __pretty__please__}}
19682 anchorencode deals with links
19684 {{anchorencode: [[hello|world]] [[hi]]}}
19691 anchorencode deals with templates
19693 {{anchorencode: {{Foo}} }}
19700 anchorencode encodes like the TOC generator: (bug 18431)
19702 === _ +:.3A%3A&&]] ===
19703 {{anchorencode: _ +:.3A%3A&&]] }}
19706 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19707 <p>.2B:.3A.253A.26.26.5D.5D
19712 Bug 6200: blockquotes and paragraph formatting
19733 Bug 8293: Use of center tag ruins paragraph formatting
19754 Parsing of overlapping (improperly nested) inline html tags
19756 <span><s>x</span></s>
19758 <p><span><s>x</span></s></span>
19761 <p><span><s>x</s></span>
19766 ### Language variants related tests
19769 Self-link in language variants
19771 title=[[Dunav]] language=sr
19773 Both [[Dunav]] and [[Дунав]] are names for this river.
19775 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19786 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19788 title=[[Duna]] language=sr
19790 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19792 <p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <strong class="selflink">Duna</strong> and <strong class="selflink">Dуна</strong> are still self-links.
19797 Link to a section of a variant of this title shouldn't be parsed as self-link
19799 title=[[Duna]] language=sr
19801 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19803 <p><strong class="selflink">Dуна</strong> is a self-link while <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dunа#Foo</a> and <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dуна#Foo</a> are not self-links.
19808 Link to pages in language variants
19812 Main Page can be written as [[Маин Паге]]
19814 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19820 Multiple links to pages in language variants
19824 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19826 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a> can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a> same as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>.
19832 Simple template in language variants
19838 <p>This is a test template
19844 Template with explicit namespace in language variants
19850 <p>This is a test template
19856 Basic test for template parameter in language variants
19860 {{парамтест|param=foo}}
19862 <p>This is a test template with parameter foo
19867 Simple category in language variants
19871 [[Category:МедиаWики Усер'с Гуиде]]
19873 cat=МедиаWики_Усер'с_Гуиде sort=
19875 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
19890 ## We used to, but no longer wt2wt this test since the default serializer
19891 ## will normalize all categories to serialize on their own line.
19892 ## This wikitext usage is going to be fairly uncommon in production and
19893 ## selser will take care of preserving formatting in those scenarios.
19895 Don't convert blue categorylinks to another variant (bug 33210)
19901 [[A]][[Category:分类]]
19905 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19906 <link rel="mw:PageProp/Category" href="Category:分类"/>
19910 Stripping -{}- tags (language variants)
19914 Latin proverb: -{Ne nuntium necare}-
19916 <p>Latin proverb: Ne nuntium necare
19922 Prevent conversion with -{}- tags (language variants)
19924 language=sr variant=sr-ec
19926 Latinski: -{Ne nuntium necare}-
19928 <p>Латински: Ne nuntium necare
19934 Prevent conversion of text with -{}- tags (language variants)
19936 language=sr variant=sr-ec
19938 Latinski: -{Ne nuntium necare}-
19940 <p>Латински: Ne nuntium necare
19946 Prevent conversion of links with -{}- tags (language variants)
19948 language=sr variant=sr-ec
19952 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19958 -{}- tags within headlines (within html for parserConvert())
19960 language=sr variant=sr-ec
19964 <h2><span class="mw-headline" id="-.7BNaslov.7D-">Naslov</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Уреди одељак „Naslov“">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>
19970 Explicit definition of language variant alternatives
19972 language=zh variant=zh-tw
19974 -{zh:China;zh-tw:Taiwan}-, not China
19976 <p>Taiwan, not China
19982 Conversion around HTML tags
19984 language=sr variant=sr-ec
19986 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19987 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19990 <span title="ЛаCтин">ски</span>
19996 Explicit session-wise language variant mapping (A flag and - flag)
19998 language=zh variant=zh-tw
20000 Taiwan is not China.
20001 But -{A|zh:China;zh-tw:Taiwan}- is China,
20002 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20003 and -{China}- is China.
20005 <p>Taiwan is not China.
20006 But Taiwan is Taiwan,
20007 (This should be stripped!)
20008 and China is China.
20013 Explicit session-wise language variant mapping (H flag for hide)
20015 language=zh variant=zh-tw
20017 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20020 <p>(This should be stripped!)
20026 Adding explicit conversion rule for title (T flag)
20028 language=zh variant=zh-tw showtitle
20030 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20033 <p>Should be stripped!
20038 Testing that changing the language variant here in the tests actually works
20040 language=zh variant=zh showtitle
20042 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20045 <p>Should be stripped!
20050 Recursive conversion of alt and title attrs shouldn't clear converter state
20052 language=zh variant=zh-cn showtitle
20054 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20055 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20059 Should be stripped<span title="Exclamation">!</span>
20064 Bug 24072: more test on conversion rule for title
20066 language=zh variant=zh-tw showtitle
20068 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20069 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20072 <p>This should be stripped!
20073 This won't take interferes with the title rule.
20078 Partly disable title conversion if variant == main language code
20080 language=zh variant=zh title=[[ZH]] showtitle
20082 -{T|zh-cn:CN;zh-tw:TW}-
20090 Partly disable title conversion if variant == main language code, more
20092 language=zh variant=zh title=[[ZH]] showtitle
20102 Raw output of variant escape tags (R flag)
20104 language=zh variant=zh-tw
20106 Raw: -{R|zh:China;zh-tw:Taiwan}-
20108 <p>Raw: zh:China;zh-tw:Taiwan
20113 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20115 language=zh variant=zh-cn
20117 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20124 Conversion rules from [numeric-only string] to [something else] (T48634)
20126 language=zh variant=zh-cn
20128 -{H|0=>zh-cn:B}--{H|0=>zh-cn:C;0=>zh-cn:D}--{H|0=>zh-hans:A}-012345-{A|zh-tw:0;zh-cn:E;}-012345
20135 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20137 language=zh variant=zh-cn
20139 -{H|zh-cn:foo;zh-tw:;}-foobar
20146 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20148 language=zh variant=zh-cn
20150 -{H|=>zh-cn:foo;}-foobar
20157 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20159 language=zh variant=zh-cn
20168 Nested using of manual convert syntax
20170 language=zh variant=zh-hk
20172 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20174 <p>Nested: Hello Hong Kong!
20178 # Since Parsoid is starting to emit canonical wikitext for links,
20179 # [http://example.com http://example.com] will not RT back to that
20182 Proper conversion of text in external links
20184 language=sr variant=sr-ec
20187 http://www.google.com
20188 gopher://www.google.com
20189 [http://www.google.com http://www.google.com]
20190 [gopher://www.google.com gopher://www.google.com]
20191 [https://www.google.com irc://www.google.com]
20192 [ftp://www.google.com www.google.com/ftp://dir]
20193 [//www.google.com www.google.com]
20195 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20196 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20197 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20198 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20199 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20200 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20201 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20204 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20205 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20206 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20207 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20208 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20209 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20210 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20214 Do not convert roman numbers to language variants
20216 language=sr variant=sr-ec
20220 <p>Фридрих IV је цар.
20225 Unclosed language converter markup "-{"
20236 Don't convert raw rule "-{R|=>}-" to "=>"
20247 Don't break link parsing if language converter markup is in the caption.
20249 language=sr variant=sr-ec
20251 [[Main Page|-{R|main page}-]]
20253 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20257 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20259 Don't break image parsing if language converter markup is in the caption.
20263 [[File:Foobar.jpg|-{R|caption}-]]
20265 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
20269 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20271 Don't break list handling if language converter markup is in the item.
20273 language=zh variant=zh-cn
20275 ;-{zh-cn:AAA;zh-tw:BBB}-
20277 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20284 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20286 Don't break table handling if language converter markup is in the cell.
20288 language=sr variant=sr-ec
20311 Bug 529: Uncovered bullet
20320 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20321 # Templates in Wikipedia rely on this behavior, as tidy has always been
20322 # enabled there. These tests are normally run *without* tidy, so specify the
20323 # full output here.
20324 # To test realistic parsing behavior, apply a tidy-like transformation to both
20325 # the expected output and your parser's output.
20327 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20329 ******* Foo {{bullet}}
20331 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo </li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li>
20337 Bug 529: Uncovered table already at line-start
20360 Bug 529: Uncovered bullet in parser function result
20362 * Foo {{lc:{{bullet}} }}
20370 Bug 5678: Double-parsed template argument
20372 {{lc:{{{1}}}|hello}}
20379 Bug 5678: Double-parsed template invocation
20381 {{lc:{{paramtest {{!}} param = hello }} }}
20383 <p>{{paramtest | param = hello }}
20388 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20391 title=[[Main Page]]
20393 {{PRVNÍVELKÉ:ěščř}}
20394 {{prvnívelké:ěščř}}
20414 Morwen/13: Unclosed link followed by heading
20421 <h2><span class="mw-headline" id="heading">heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
20426 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20433 <h1><span class="mw-headline" id="heading">heading</span></h1>
20438 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20445 <h2><span class="mw-headline" id="heading">heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
20460 Paragraphs inside divs (no extra line breaks)
20472 Paragraphs inside divs (extra line break on open)
20487 Paragraphs inside divs (extra line break on close)
20502 Paragraphs inside divs (extra line break on open and close)
20519 Nesting tags, paragraphs on lines which begin with <div>
20521 <div></div><strong>A
20524 <p><strong>A</strong></p>
20525 <p><strong>B</strong></p>
20533 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20535 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20537 <blockquote>Line one
20539 Line two</blockquote>
20541 <blockquote>Line one
20542 Line two</blockquote>
20546 <p>Line one Line two</p>
20551 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20556 Line two</blockquote>
20561 Line two</blockquote>
20566 Line two</blockquote>
20570 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20572 <blockquote>Line one
20577 <blockquote>Line one
20590 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20612 Paragraphs inside blockquotes/divs (no extra line breaks)
20614 <blockquote><div>Line one
20616 Line two</div></blockquote>
20618 <blockquote><div>Line one
20619 Line two</div></blockquote>
20624 Paragraphs inside blockquotes/divs (extra line break on open)
20629 Line two</div></blockquote>
20634 Line two</div></blockquote>
20639 Paragraphs inside blockquotes/divs (extra line break on close)
20641 <blockquote><div>Line one
20644 </div></blockquote>
20646 <blockquote><div>Line one
20649 </div></blockquote>
20654 Paragraphs inside blockquotes/divs (extra line break on open and close)
20660 </div></blockquote>
20666 </div></blockquote>
20671 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20673 wgLinkHolderBatchSize=0
20679 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20680 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20681 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20686 Free external link invading image caption
20688 [[Image:Foobar.jpg|thumb|http://x|hello]]
20690 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>hello</div></div></div>
20695 Bug 15196: localised external link numbers
20699 [http://en.wikipedia.org/]
20701 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20704 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20708 Multibyte character in padleft
20710 {{padleft:-Hello|7|Æ}}
20717 Multibyte character in padright
20719 {{padright:Hello-|7|Æ}}
20726 formatdate parser function
20728 {{#formatdate:2009-03-24}}
20730 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20735 formatdate parser function, with default format
20737 {{#formatdate:2009-03-24|mdy}}
20739 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20744 Spacing of numbers in formatted dates
20746 {{#formatdate:January 15}}
20748 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20753 formatdate parser function, with default format and on a page of which the content language is always English and different from the wiki content language
20755 language=nl title=[[MediaWiki:Common.css]]
20757 {{#formatdate:2009-03-24|dmy}}
20759 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20772 Edit comment with link
20776 I like the [[Main Page]] a lot
20778 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20782 Edit comment with link and link text
20786 I like the [[Main Page|best pages]] a lot
20788 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20792 Edit comment with link and link text with suffix
20796 I like the [[Main Page|best page]]s a lot
20798 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20802 Edit comment with section link (non-local, eg in history list)
20804 comment title=[[Main Page]]
20806 /* External links */ removed bogus entries
20808 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20812 Edit comment with section link and text before it (non-local, eg in history list)
20814 comment title=[[Main Page]]
20816 pre-comment text /* External links */ removed bogus entries
20818 pre-comment text <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20822 Edit comment with section link (local, eg in diff view)
20824 comment local title=[[Main Page]]
20826 /* External links */ removed bogus entries
20828 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20832 Edit comment with subpage link (bug 14080)
20836 title=[[Subpage test]]
20838 Poked at a [[/subpage]] here...
20840 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20844 Edit comment with subpage link and link text (bug 14080)
20848 title=[[Subpage test]]
20850 Poked at a [[/subpage|neat little page]] here...
20852 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20856 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20859 title=[[Subpage test]]
20861 Poked at a [[/subpage]] here...
20863 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20867 Edit comment with bare anchor link (local, as on diff)
20871 title=[[Main Page]]
20875 <a href="#section">#section</a>
20879 Edit comment with bare anchor link (non-local, as on history)
20882 title=[[Main Page]]
20886 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20890 Anchor starting with underscore
20896 <p><a href="#_ref">One</a>
20899 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20903 Id starting with underscore
20905 <div id="_ref"></div>
20907 <div id="_ref"></div>
20912 Edit comment with link with more than one pipe (T99346)
20916 [[Main Page|Many|pipes]]
20918 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
20922 Complex edit comment with link with more than one pipe (T99346)
20926 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
20928 Created page with "<noinclude><a href="/index.php?title=Category:Requests_for_permissions/Bot&action=edit&redlink=1" class="new" title="Category:Requests for permissions/Bot (page does not exist)">{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}</a></noinclude> === <a href="/index.php?title=User:MineoBot&action=edit&redlink=1" class="new" title="User:MineoBot (page does not exist)">User:MineoBot</a> 8=== {{Request for permissions/links|Mineo..."
20932 Space normalisation on autocomment (bug 22784)
20935 title=[[Main Page]]
20937 /* __hello__world__ */
20939 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20943 percent-encoding and + signs in comments (Bug 26410)
20947 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20949 <a href="/index.php?title=ABC3D%25_%2B%2B&action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">ABC3D% ++</a> <a href="/index.php?title=ABC3D%25_%2B%2B&action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">+%20</a>
20952 # Parsoid doesn't support this yet: see bug 73581
20953 # but it *should* omit the 'src' attribute if the image is bad.
20954 # PHP side of tests was disabled in
20955 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20956 # because of issues in the PHP parserTests infrastructure
20957 # (but the output below is indeed what the PHP side emits)
20959 Bad images - basic functionality
20962 !! DISABLED/html/php
20964 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"bad-image","message":"This image is blacklisted in this context."}]}'><a href="./File:Bad.jpg"><img resource="./File:Bad.jpg" height="220" width="220"/></a></span></p>
20968 Bad images - bug 16039: text after bad image disappears
20973 !! DISABLED/html/php
20979 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"bad-image","message":"This image is blacklisted in this context."}]}'><a href="./File:Bad.jpg"><img resource="./File:Bad.jpg" height="220" width="220"/></a></span>
20984 Verify that displaytitle works (bug #22501) no displaytitle
20988 wgAllowDisplayTitle=true
20989 wgRestrictDisplayTitle=false
20991 this is not the the title
20994 <p>this is not the the title
20999 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
21004 wgAllowDisplayTitle=true
21005 wgRestrictDisplayTitle=false
21007 this is not the the title
21008 {{DISPLAYTITLE:whatever}}
21011 <p>this is not the the title
21016 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
21021 wgAllowDisplayTitle=true
21022 wgRestrictDisplayTitle=true
21024 this is not the the title
21025 {{DISPLAYTITLE:whatever}}
21028 <p>this is not the the title
21033 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
21038 wgAllowDisplayTitle=true
21039 wgRestrictDisplayTitle=true
21041 this is not the the title
21042 {{DISPLAYTITLE:screen}}
21045 <p>this is not the the title
21050 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
21055 wgAllowDisplayTitle=false
21057 this is not the the title
21058 {{DISPLAYTITLE:screen}}
21061 <p>this is not the the title
21062 <a href="/index.php?title=Template:DISPLAYTITLE:screen&action=edit&redlink=1" class="new" title="Template:DISPLAYTITLE:screen (page does not exist)">Template:DISPLAYTITLE:screen</a>
21067 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
21072 wgAllowDisplayTitle=false
21074 this is not the the title
21077 <p>this is not the the title
21082 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
21087 wgAllowDisplayTitle=true
21088 wgRestrictDisplayTitle=true
21090 this is not the the title
21091 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21093 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21094 <p>this is not the the title
21099 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
21104 wgAllowDisplayTitle=true
21105 wgRestrictDisplayTitle=true
21107 this is not the the title
21108 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21110 <span style="color: red;">s</span>creen
21111 <p>this is not the the title
21116 Page status indicators: Empty name is invalid
21120 <indicator name=" "></indicator>
21121 <indicator></indicator>
21123 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21124 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21129 Page status indicators: Weird syntaxes that are okay
21133 <indicator name="empty" />
21134 <indicator name="name"></indicator>
21143 Page status indicators: Torture test
21147 <indicator name="01">hello world</indicator>
21148 <indicator name="02">[[Main Page]]</indicator>
21149 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21150 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21151 <indicator name="05">* foo
21153 <indicator name="06"><nowiki>foo</nowiki></indicator>
21154 <indicator name="07"> Preformatted</indicator>
21155 <indicator name="08"><div>Broken tag</indicator>
21156 <indicator name="09">{| class=wikitable
21159 <indicator name="10">Two
21161 paragraphs</indicator>
21164 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21165 03=<img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" />
21166 04=<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" /></a>
21167 05=<ul><li> foo</li>
21171 07=<pre>Preformatted
21173 08=<div>Broken tag</div>
21175 09=<table class="wikitable">
21192 preload: check <noinclude> and <includeonly>
21196 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21202 preload: check <onlyinclude>
21206 Goodbye <onlyinclude>Hello world</onlyinclude>
21212 preload: can pass tags through if we want to
21216 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21218 <includeonly>Hello world</includeonly>
21222 preload: check that it doesn't try to do tricks
21226 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21228 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21232 Play a bit with r67090 and bug 3158
21234 <div style="width:50% !important"> </div>
21235 <div style="width:50% !important"> </div>
21236 <div style="width:50% !important"> </div>
21237 <div style="border : solid;"> </div>
21239 <div style="width:50% !important"> </div>
21240 <div style="width:50% !important"> </div>
21241 <div style="width:50% !important"> </div>
21242 <div style="border : solid;"> </div>
21245 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21246 <div style="width:50% !important" data-parsoid='{"stx":"html","a":{"style":"width:50% !important"},"sa":{"style":"width:50%&nbsp;!important"}}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21247 <div style="width:50% !important" data-parsoid='{"stx":"html","a":{"style":"width:50% !important"},"sa":{"style":"width:50%&#160;!important"}}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21248 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21253 HTML5 data attributes
21255 <span data-foo="bar">Baz</span>
21256 <p data-abc-def_hij="">Quuz</p>
21258 <p><span data-foo="bar">Baz</span>
21260 <p data-abc-def_hij="">Quuz</p>
21263 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21264 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21268 Strip reserved data attributes
21270 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21272 <div data-ok="fred">d</div>
21275 <div data-x-data-mw="foo" data-x-data-parsoid="bar" data-x-data-mw-someext="baz" data-ok="fred" data-parsoid='{"stx":"html","a":{"data-ooui":null,"data-bad:ns":null},"sa":{"data-ooui":"xyzzy","data-bad:ns":"ns"}}'>d</div>
21279 percent-encoding and + signs in internal links (Bug 26410)
21281 [[User:+%]] [[Page+title%]]
21282 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21283 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21284 [[%33%45]] [[%33%45+]]
21286 <p><a href="/index.php?title=User:%2B%25&action=edit&redlink=1" class="new" title="User:+% (page does not exist)">User:+%</a> <a href="/index.php?title=Page%2Btitle%25&action=edit&redlink=1" class="new" title="Page+title% (page does not exist)">Page+title%</a>
21287 <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+</a> <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%20</a> <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+ </a> <a href="/index.php?title=%25%2Br&action=edit&redlink=1" class="new" title="%+r (page does not exist)">%+r</a>
21288 <a href="/index.php?title=%25&action=edit&redlink=1" class="new" title="% (page does not exist)">%</a> <a href="/index.php?title=%2B&action=edit&redlink=1" class="new" title="+ (page does not exist)">+</a> <a href="/index.php?title=Special:Upload&wpDestFile=%25%2Babc9" class="new" title="File:%+abc9">bar</a>
21289 <a href="/index.php?title=3E&action=edit&redlink=1" class="new" title="3E (page does not exist)">3E</a> <a href="/index.php?title=3E%2B&action=edit&redlink=1" class="new" title="3E+ (page does not exist)">3E+</a>
21292 <p><a rel="mw:WikiLink" href="./User:+%25" title="User:+%" data-parsoid='{"stx":"simple","a":{"href":"./User:+%25"},"sa":{"href":"User:+%"}}'>User:+%</a> <a rel="mw:WikiLink" href="./Page+title%25" title="Page+title%" data-parsoid='{"stx":"simple","a":{"href":"./Page+title%25"},"sa":{"href":"Page+title%"}}'>Page+title%</a>
21293 <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%+</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"piped","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%20</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+ "}}'>%+ </a> <a rel="mw:WikiLink" href="./%25+r" title="%+r" data-parsoid='{"stx":"simple","a":{"href":"./%25+r"},"sa":{"href":"%+r"}}'>%+r</a>
21294 <a rel="mw:WikiLink" href="./%25" title="%" data-parsoid='{"stx":"simple","a":{"href":"./%25"},"sa":{"href":"%"}}'>%</a> <a rel="mw:WikiLink" href="./+" title="+" data-parsoid='{"stx":"simple","a":{"href":"./+"},"sa":{"href":"+"}}'>+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./Bar\" title=\"Bar\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bar\"},\"sa\":{\"href\":\"bar\"},\"dsr\":[94,101,2,2]}'>bar</a>"}'><a href="./File:%25+abc9" data-parsoid='{"a":{"href":"./File:%25+abc9"},"sa":{}}'><img resource="./File:%25+abc9" src="./Special:FilePath/%25+abc9" height="220" width="220" data-parsoid='{"a":{"resource":"./File:%25+abc9","height":"220","width":"220"},"sa":{"resource":"File:%+abc%39"}}'/></a></span>
21295 <a rel="mw:WikiLink" href="./3E" title="3E" data-parsoid='{"stx":"simple","a":{"href":"./3E"},"sa":{"href":"%33%45"}}'>3E</a> <a rel="mw:WikiLink" href="./3E+" title="3E+" data-parsoid='{"stx":"simple","a":{"href":"./3E+"},"sa":{"href":"%33%45+"}}'>3E+</a></p>
21299 Special characters in embedded file links (bug 27679)
21301 [[File:Contains & ampersand.jpg]]
21302 [[File:Does not exist.jpg|Title with & ampersand]]
21304 <p><a href="/index.php?title=Special:Upload&wpDestFile=Contains_%26_ampersand.jpg" class="new" title="File:Contains & ampersand.jpg">File:Contains & ampersand.jpg</a>
21305 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21308 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Contains_&_ampersand.jpg"><img resource="./File:Contains_&_ampersand.jpg" src="./Special:FilePath/Contains_&_ampersand.jpg" height="220" width="220"/></a></span>
21309 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"Title with &amp; ampersand"}'><a href="./File:Does_not_exist.jpg"><img resource="./File:Does_not_exist.jpg" src="./Special:FilePath/Does_not_exist.jpg" height="220" width="220"/></a></span></p>
21313 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21315 Text's been normalized?
21317 <p>Text's been normalized?
21322 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21324 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21326 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21331 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21333 [http://www.example.org/ ideograms]
21335 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21340 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21342 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21344 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21368 Bug 31098 Template which includes system messages which includes the template
21372 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21373 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21378 Bug31490 Turkish: ucfirst 'blah'
21389 Bug31490 Turkish: ucfirst 'ix'
21400 Bug31490 Turkish: lcfirst 'BLAH'
21411 Bug31490 Turkish: ucfırst (with a dotless i)
21417 <p><a href="/index.php?title=%C5%9Eablon:Ucf%C4%B1rst:blah&action=edit&redlink=1" class="new" title="Şablon:Ucfırst:blah (sayfa mevcut değil)">Şablon:Ucfırst:blah</a>
21422 Bug31490 ucfırst (with a dotless i) with English language
21428 <p><a href="/index.php?title=Template:Ucf%C4%B1rst:blah&action=edit&redlink=1" class="new" title="Template:Ucfırst:blah (page does not exist)">Template:Ucfırst:blah</a>
21433 Bug 26375: TOC with italics
21435 title=[[Main Page]]
21438 == ''Lost'' episodes ==
21440 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21442 <li class="toclevel-1 tocsection-1"><a href="#Lost_episodes"><span class="tocnumber">1</span> <span class="toctext"><i>Lost</i> episodes</span></a></li>
21446 <h2><span class="mw-headline" id="Lost_episodes"><i>Lost</i> episodes</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Lost episodes">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21451 Bug 26375: TOC with bold
21453 title=[[Main Page]]
21456 == '''should be bold''' then normal text ==
21458 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21460 <li class="toclevel-1 tocsection-1"><a href="#should_be_bold_then_normal_text"><span class="tocnumber">1</span> <span class="toctext"><b>should be bold</b> then normal text</span></a></li>
21464 <h2><span class="mw-headline" id="should_be_bold_then_normal_text"><b>should be bold</b> then normal text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: should be bold then normal text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21469 Bug 33845: Headings become cursive in TOC when they contain an image
21471 title=[[Main Page]]
21474 == Image [[Image:foobar.jpg]] ==
21476 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21478 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21482 <h2><span class="mw-headline" id="Image">Image <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Image">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21487 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21489 title=[[Main Page]]
21492 == <blockquote>Quote</blockquote> ==
21494 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21496 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21500 <h2><span class="mw-headline" id="Quote"><blockquote>Quote</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21504 <div id="toc" class="toc">
21505 <div id="toctitle">
21509 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21513 <h2><span class="mw-headline" id="Quote"></span></h2>
21515 <p><span class="mw-headline" id="Quote">Quote</span></p>
21517 <p><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></p>
21521 Unclosed tags in TOC
21523 title=[[Main Page]]
21527 <small>Hanc marginis exiguitas non caperet.</small>
21530 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21532 <li class="toclevel-1 tocsection-1"><a href="#Proof:_2_.3C_3"><span class="tocnumber">1</span> <span class="toctext">Proof: 2 < 3</span></a></li>
21536 <h2><span class="mw-headline" id="Proof:_2_.3C_3">Proof: 2 < 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Proof: 2 < 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21537 <p><small>Hanc marginis exiguitas non caperet.</small>
21543 Multiple tags in TOC
21546 == <i>Foo</i> <b>Bar</b> ==
21548 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21550 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21552 <li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
21553 <li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
21557 <h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21558 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote>Bar</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21562 <div id="toc" class="toc">
21563 <div id="toctitle">
21567 <li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
21568 <li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
21572 <h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21573 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21575 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21577 <p><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></p>
21580 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21581 # html5 tag parsing.
21583 Tags with parameters in TOC
21588 == <sup class="in-h2">Hello</sup> ==
21590 == <sup class="a > b">Evilbye</sup> ==
21592 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21594 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21595 <li class="toclevel-1 tocsection-2"><a href="#b.22.3EEvilbye"><span class="tocnumber">2</span> <span class="toctext"><sup> b">Evilbye</sup></span></a></li>
21599 <h2><span class="mw-headline" id="Hello"><sup class="in-h2">Hello</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Hello">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21600 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup class="a"> b">Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21603 <meta property="mw:PageProp/toc" />
21604 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21606 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21610 span tags with directionality in TOC
21613 == <span dir="ltr">C++</span> ==
21615 == <span dir="rtl">זבנג!</span> ==
21617 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21619 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21621 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21623 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21625 <li class="toclevel-1 tocsection-1"><a href="#C.2B.2B"><span class="tocnumber">1</span> <span class="toctext"><span dir="ltr">C++</span></span></a></li>
21626 <li class="toclevel-1 tocsection-2"><a href="#.D7.96.D7.91.D7.A0.D7.92.21"><span class="tocnumber">2</span> <span class="toctext"><span dir="rtl">זבנג!</span></span></a></li>
21627 <li class="toclevel-1 tocsection-3"><a href="#The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">3</span> <span class="toctext"><span>The attributes on these span tags must be deleted from the TOC</span></span></a></li>
21628 <li class="toclevel-1 tocsection-4"><a href="#All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">4</span> <span class="toctext"><span>All attributes on these span tags must be deleted from the TOC</span></span></a></li>
21629 <li class="toclevel-1 tocsection-5"><a href="#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">5</span> <span class="toctext"><span dir="ltr">Attributes after dir on these span tags must be deleted from the TOC</span></span></a></li>
21633 <h2><span class="mw-headline" id="C.2B.2B"><span dir="ltr">C++</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: C++">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21634 <h2><span class="mw-headline" id=".D7.96.D7.91.D7.A0.D7.92.21"><span dir="rtl">זבנג!</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: זבנג!">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21635 <h2><span class="mw-headline" id="The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: The attributes on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21636 <h2><span class="mw-headline" id="All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: All attributes on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21637 <h2><span class="mw-headline" id="Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Attributes after dir on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21642 Bug 72884: bdi element in ToC
21645 == <bdi>test</bdi> ==
21647 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21649 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21653 <h2><span class="mw-headline" id="test"><bdi>test</bdi></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21658 T35715: s/strike element in ToC
21661 == <s>test</s> test <strike>test</strike> ==
21663 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21665 <li class="toclevel-1 tocsection-1"><a href="#test_test_test"><span class="tocnumber">1</span> <span class="toctext"><s>test</s> test <strike>test</strike></span></a></li>
21669 <h2><span class="mw-headline" id="test_test_test"><s>test</s> test <strike>test</strike></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: test test test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21673 # Note that the html output does not have the <p></p>, but the
21674 # html+tidy output *does*. This is because the empty <p></p> is
21675 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21677 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21682 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21684 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21688 <h2><span class="mw-headline" id="x">x</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: x">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21692 <div id="toc" class="toc">
21693 <div id="toctitle">
21697 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21701 <h2><span class="mw-headline" id="x">x</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: x">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21707 == {{int:headline_sample}} ==
21711 Bug 32057: Title needed when expanding <h> nodes.
21713 title=[[Main Page]]
21717 <h2><span class="mw-headline" id="Headline_text">Headline text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Headline text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21722 Strip marker in urlencode
21724 {{urlencode:x<nowiki/>y}}
21725 {{urlencode:x<nowiki/>y|wiki}}
21726 {{urlencode:x<nowiki/>y|path}}
21727 {{urlencode:x<pre id="one">two</pre>y}}
21755 Strip marker in formatNum
21757 {{formatnum:1<nowiki/>2}}
21758 {{formatnum:1<nowiki/>2|R}}
21766 Check noCommafy in formatNum
21770 {{formatnum:123456.78}}
21771 {{formatnum:123456.78|NOSEP}}
21779 Wrong option for formatNum (bug 56199)
21781 {{formatnum:1,234.56|Random}}
21782 {{formatnum:1,234.56|EVERYTHING}}
21783 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21792 Strip marker in grammar
21796 {{grammar:elative|foo<nowiki/>bar}}
21803 Strip marker in padleft
21805 {{padleft:|2|x<nowiki/>y}}
21812 Strip marker in padright
21814 {{padright:|2|x<nowiki/>y}}
21821 Strip marker in anchorencode
21823 {{anchorencode:x<nowiki/>y}}
21830 nowiki inside link inside heading (bug 18295)
21832 ==[[foo|x<nowiki>y</nowiki>z]]==
21834 <h2><span class="mw-headline" id="xyz"><a href="/wiki/Foo" title="Foo">xyz</a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: xyz">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
21839 new support for bdi element (bug 31817)
21841 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21843 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21848 Ignore pipe between table row attributes
21852 |- id=foo | style='color: red'
21860 <tr id="foo" style="color: red">
21867 Gallery override link with WikiLink (bug 34852)
21870 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21873 <ul class="gallery mw-gallery-traditional">
21874 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21875 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/InterWikiLink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21876 <div class="gallerytext">
21886 Gallery override link with absolute external link (bug 34852)
21889 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21892 <ul class="gallery mw-gallery-traditional">
21893 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21894 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21895 <div class="gallerytext">
21905 Gallery override link with malicious javascript (bug 34852)
21908 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21911 <ul class="gallery mw-gallery-traditional">
21912 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21913 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21914 <div class="gallerytext">
21924 Gallery with invalid title as link (bug 43964)
21927 File:foobar.jpg|link=<
21930 <ul class="gallery mw-gallery-traditional">
21931 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21932 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
21933 <div class="gallerytext">
21941 Language parser function
21950 Padleft and padright as substr
21952 {{padleft:|3|abcde}}
21953 {{padright:|3|abcde}}
21961 Special parser function
21963 {{#special:RandomPage}}
21964 {{#special:BaDtItLe}}
21965 {{#special:Foobar}}
21974 Bug 34939 - Case insensitive link parsing ([HttP://])
21976 [HttP://MediaWiki.Org/]
21978 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21981 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21985 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21987 [HttP://MediaWiki.Org/ MediaWiki]
21989 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21994 Bug 34939 - Case insensitive link parsing (HttP://)
21996 HttP://MediaWiki.Org/
21998 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22001 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22019 <h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22020 <h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22021 <h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22022 <h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22023 <h2><span class="mw-headline" id="Section_5">Section 5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 5">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22029 ### Parsoid-specific tests
22030 ### Parsoid-PHP parser incompatibilities
22033 1. SOL-sensitive wikitext tokens as template-args
22035 parsoid=wt2html,wt2wt
22041 <span about="#mwt1" typeof="mw:Transclusion">
22042 </span><ul about="#mwt1"><li>a</li>
22044 <span about="#mwt2" typeof="mw:Transclusion">
22045 </span><ol about="#mwt2"><li>a</li>
22047 <span about="#mwt3" typeof="mw:Transclusion">
22048 </span><dl about="#mwt3"><dd>a</dd>
22052 #### -----------------------------------------------------------------
22053 #### Parsoid-specific functionality tests
22054 #### -----------------------------------------------------------------
22056 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
22057 # We know wt2wt will fail, but we expect selser to pass.
22058 # Due to the nature of our testing, wt2wt and selser tests will enter the
22059 # blacklist and we'll catch selser regressions based on changes to the
22060 # blacklist entries for selser tests.
22062 1. Bad treebuilder fixup of formatting elt is cleaned up
22064 parsoid=wt2html,wt2wt
22069 [[Image:Foobar.jpg|right|Test]]
22076 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Test</figcaption></figure>
22083 2. Bad treebuilder fixup of formatting elt is cleaned up
22085 parsoid=wt2html,wt2wt
22087 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22089 <small>[[Image:Foobar.jpg|right|300px]]</small>
22093 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><b>caption</b></figcaption></figure>
22095 <small><figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure></small>
22099 3. Bad treebuilder fixup of formatting elt is cleaned up
22101 parsoid=wt2html,wt2wt
22103 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22105 <p><small><b>foo</b></small></p>
22106 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><small><b>caption</b></small></figcaption></figure>
22107 <p><small><b>bar</b></small></p>
22111 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22113 parsoid=wt2html,wt2wt
22115 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22117 <p><b><small></small></b></p>
22118 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure>
22122 #### ----------------------------------------------------------------
22123 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
22124 #### tags. Parsoid's output for these tags differs from that of the
22126 #### ----------------------------------------------------------------
22129 Ref: 1. ref-location should be replaced with an index span
22132 B <ref name="x">foo</ref>
22136 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22137 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-2"},"attrs":{"name":"x"}}'><a href="#cite_note-x-2"><span class="mw-reflink-text">[2]</span></a></span>
22138 C <span about="#mwt6" class="mw-ref" id="cite_ref-y_3-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"y"}}'><a href="#cite_note-y-3"><span class="mw-reflink-text">[3]</span></a></span></p>
22139 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22140 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22141 <li about="#cite_note-x-2" id="cite_note-x-2"><a href="#cite_ref-x_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-x-2" class="mw-reference-text">foo</span></li>
22142 <li about="#cite_note-y-3" id="cite_note-y-3"><a href="#cite_ref-y_3-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-y-3" class="mw-reference-text"></span></li>
22147 Ref: 2. ref-tags with identical names should all get the same index
22149 A <ref name="x">foo</ref>
22153 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22154 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22155 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22156 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy"><a href="#cite_ref-x_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-x_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
22161 Ref: 3. spaces in ref-names should be ignored
22163 A <ref name="x">foo</ref>
22164 B <ref name=" x " />
22168 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22169 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
22170 C <span about="#mwt6" class="mw-ref" id="cite_ref-x_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22171 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22172 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy"><a href="#cite_ref-x_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-x_1-1"><span class="mw-linkback-text">2 </span></a><a href="#cite_ref-x_1-2"><span class="mw-linkback-text">3 </span></a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
22176 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
22178 Ref: 4. 'constructor' should be accepted as a valid ref-name
22180 A <ref name="constructor">foo</ref>
22183 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-constructor_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-constructor-1"},"attrs":{"name":"constructor"}}'><a href="#cite_note-constructor-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22184 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22185 <li about="#cite_note-constructor-1" id="cite_note-constructor-1"><a href="#cite_ref-constructor_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-constructor-1" class="mw-reference-text">foo</span></li>
22190 Ref: 5. body should accept generic wikitext
22193 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22198 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22200 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22201 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">This is a <b><a rel="mw:WikiLink" href="Bolded_link" title="Bolded link">bolded link</a></b> and this is a <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"transclusion"}},"i":0}}]}'>transclusion</span>
22207 Ref: 6. indent-pres should not be output in ref-body
22217 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22219 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22220 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
22228 Ref: 7. No p-wrapping in ref-body
22245 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22247 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22248 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
22263 Ref: 8. transclusion wikitext has lower precedence
22265 A <ref> foo {{echo|</ref> B C}}
22269 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C}}</p>
22270 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22271 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo {{echo|</span></li>
22276 Ref: 9. unclosed comments should not leak out of ref-body
22278 A <ref> foo <!--</ref> B C
22281 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
22282 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22283 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <!----></span></li>
22288 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22290 A <ref> <b> foo </ref> B C
22294 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
22297 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22298 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></span></li>
22303 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22309 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B
22310 C <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> D</p>
22311 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22312 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22313 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22318 Ref: 12. ref-tags act as trailing newline migration barrier
22320 <!--the newline at the end of this line moves out of the p tag-->a
22322 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22328 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22331 <p>b<!--the newline at the end of this line stays inside the p tag--> <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22332 <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22335 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22336 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"></span></li>
22337 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"></span></li></ol>
22341 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22348 <p><span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> A
22349 <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> B</p>
22350 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22351 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22352 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar
22358 Ref: 14. A nested ref-tag should be emitted as plain text
22360 <ref>foo <ref>bar</ref> baz</ref>
22364 <p><span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22366 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22367 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <ref>bar</ref> baz</span></li>
22372 Ref: 15. ref-tags with identical names should get identical indexes
22374 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22375 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22379 <p>A1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a-1"},"attrs":{"name":"a"}}'><a href="#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span> A2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span>
22380 B1 <span about="#mwt7" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"b"}}'><a href="#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span> B2 <span about="#mwt8" class="mw-ref" id="cite_ref-b_2-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22382 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-a_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></li><li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="#cite_ref-b_2-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-b_2-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
22386 ## We don't bother wt2wt-ing non-standard whitespace
22388 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22396 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22397 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22398 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
22402 Ref: 17. Generate valid HTML5 id/about attributes
22404 <ref name="a b">foo</ref>
22408 <p><span class="mw-ref" id="cite_ref-a_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_b-1"},"attrs":{"name":"a b"}}'><a href="#cite_note-a_b-1"><span class="mw-reflink-text">[1]</span></a></span>
22411 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22412 <li about="#cite_note-a_b-1" id="cite_note-a_b-1"><a href="#cite_ref-a_b_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-a_b-1" class="mw-reference-text">foo</span></li>
22417 Ref: 18. T58916: Extension attributes should be parsed as plain text
22419 <ref name="{{echo|a}}">foo</ref>
22423 <p><span class="mw-ref" id="cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1"},"attrs":{"name":"{{echo|a}}"}}'><a href="#cite_note-.7B.7Becho.7Ca.7D.7D-1"><span class="mw-reflink-text">[1]</span></a></span>
22426 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22427 <li about="#cite_note-.7B.7Becho.7Ca.7D.7D-1" id="cite_note-.7B.7Becho.7Ca.7D.7D-1"><a href="#cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1" class="mw-reference-text">foo</span></li>
22432 Ref: 19. ref-tags with identical name encodings should get identical indexes
22434 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22438 <p>1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_.26_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_.26_b-1"},"attrs":{"name":"a & b"}}'><a href="#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span> 2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_.26_b_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a &amp; b"}}'><a href="#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span>
22440 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22441 <li about="#cite_note-a_.26_b-1" id="cite_note-a_.26_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_.26_b_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-a_.26_b_1-1"><span class="mw-linkback-text">2 </span></a></span> <span id="mw-reference-text-cite_note-a_.26_b-1" class="mw-reference-text">foo</span></li>
22446 Ref: 20. ref-tags with identical names but different content should keep it
22448 A <ref name="foo">Foo one</ref>
22449 B <ref name="foo">Foo two</ref>
22450 C <ref name="foo" />
22454 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-foo_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-foo-1"},"attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
22455 B <span about="#mwt4" class="mw-ref" id="cite_ref-foo_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"Foo two"},"attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
22456 C <span about="#mwt6" class="mw-ref" id="cite_ref-foo_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22458 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-foo-1" id="cite_note-foo-1"><span rel="mw:referencedBy"><a href="#cite_ref-foo_1-0"><span class="mw-linkback-text">1 </span></a><a href="#cite_ref-foo_1-1"><span class="mw-linkback-text">2 </span></a><a href="#cite_ref-foo_1-2"><span class="mw-linkback-text">3 </span></a></span> <span id="mw-reference-text-cite_note-foo-1" class="mw-reference-text">Foo one</span></li>
22463 References: 1. references tag without any refs should be handled properly
22467 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22471 References: 2. references tag with group only outputs references from that group
22473 A <ref group="a">foo</ref>
22474 B <ref group="b">bar</ref>
22477 <references group="a" />
22479 <references group="b" />
22481 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{"group":"a"}}'><a href="#cite_note-1" data-mw-group="a"><span class="mw-reflink-text">[a 1]</span></a></span>
22482 B <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"b"}}'><a href="#cite_note-2" data-mw-group="b"><span class="mw-reflink-text">[b 1]</span></a></span>
22483 C <span class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="#cite_note-3"><span class="mw-reflink-text">[1]</span></a></span></p>
22485 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22486 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" data-mw-group="a" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22488 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22489 <li about="#cite_note-3" id="cite_note-3"><a href="#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">baz</span></li>
22491 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22492 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" data-mw-group="b" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22497 References: 3. ref list should be cleared after processing references
22507 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22509 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22512 <p>B <span about="#mwt6" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[1]</span></a></span></p>
22514 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22515 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22520 References: 4. only referenced group should be cleared after processing references
22522 A <ref group="a">afoo</ref>
22525 <references group="a" />
22531 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{"group":"a"}}'><a href="#cite_note-1" data-mw-group="a"><span class="mw-reflink-text">[a 1]</span></a></span>
22532 B <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[1]</span></a></span></p>
22534 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" data-mw-group="a" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">afoo</span></li>
22537 <p>C <span about="#mwt8" class="mw-ref" id="cite_ref-3" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-3"},"attrs":{}}'><a href="#cite_note-3"><span class="mw-reflink-text">[2]</span></a></span></p>
22539 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bfoo</span></li><li about="#cite_note-3" id="cite_note-3"><a href="#cite_ref-3" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">cfoo</span></li>
22543 ## Don't expect this to rt since we're dropping content
22545 References: 5. ref tags in references should be processed while ignoring all other content
22547 parsoid=wt2html,html2html
22550 B <ref name="b">bar</ref>
22553 <ref name="a">foo</ref>
22554 This should just get lost.
22557 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span>
22558 B <span about="#mwt4" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span></p>
22561 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{},"body":{"html":"\n<span about=\"#mwt8\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[59,82,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-a-1\"},\"attrs\":{\"name\":\"a\"}}'><a href=\"#cite_note-a-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span>\n"}}'><li about="#cite_note-a-1" id="cite_note-a-1"><a href="#cite_ref-a_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></li><li about="#cite_note-b-2" id="cite_note-b-2"><a href="#cite_ref-b_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
22566 References: 6. <references /> from a transclusion
22568 <ref>Foo</ref> {{echo|<references />}}
22570 <p><span about="#mwt3" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p> <ol class="mw-references" typeof="mw:Extension/references mw:Transclusion" about="#mwt4" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<references />"}},"i":0}}]}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">Foo</span></li>
22575 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22577 A <ref>foo bar for a</ref>
22578 B <ref group="X" name="b" />
22582 <references group="X">
22583 <ref name="b">foo</ref>
22586 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22587 B <span about="#mwt4" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"group":"X","name":"b"}}'><a href="#cite_note-b-2" data-mw-group="X"><span class="mw-reflink-text">[X 1]</span></a></span>
22590 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22591 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo bar for a</span></li>
22594 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="X" data-mw='{"name":"references","attrs":{"group":"X"},"body":{"html":"\n<span about=\"#mwt10\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[96,119,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-b-2\"},\"attrs\":{\"name\":\"b\"}}'><a href=\"#cite_note-b-2\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"X\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[X 1]</span></a></span>\n"}}'>
22595 <li about="#cite_note-b-2" id="cite_note-b-2"><a href="#cite_ref-b_2-0" data-mw-group="X" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">foo</span></li>
22600 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22602 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22605 <p>X<span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>"}},"i":0}}]}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22606 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt7" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <b data-parsoid='{"stx":"html"}'>bar</b> and baz boo</span></li>
22610 # This test only works in wt2html now as the <references /> are always generated
22611 # unless selser is active. Once T72722 is fixed, we should add a changes test
22612 # here to ensure that unrelated changes don't add the new <references />
22613 # when selser is active.
22615 References: 9. Generate missing references list at the end
22618 B <ref group="inexistent">bar</ref>
22620 <p>A <span class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B <span class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{"group":"inexistent"}}'><a href="#cite_note-2" data-mw-group="inexistent"><span class="mw-reflink-text">[inexistent 1]</span></a></span></p>
22621 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22622 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22624 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22625 <li about="#cite_note-2" id="cite_note-2"><a href="#cite_ref-2" data-mw-group="inexistent" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
22630 References: 10. New <references/> shouldn't be added for unrelated edits.
22633 "modes": ["selser"],
22634 "changes": [["#x", "remove"]],
22638 Unrelated text<span id="x"> that's going to disappear</span>.
22646 Entities in ref name
22648 <ref name="test & me">hi</ref>
22651 <p><span about="#mwt2" class="mw-ref" id="cite_ref-test_.26_me_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-test_.26_me-1"},"attrs":{"name":"test &amp; me"}}'><a href="#cite_note-test_.26_me-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22652 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22653 <li about="#cite_note-test_.26_me-1" id="cite_note-test_.26_me-1"><a href="#cite_ref-test_.26_me_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-test_.26_me-1" class="mw-reference-text">hi</span></li>
22657 ## The output here may look funny, but it's what the php parser will do. The
22658 ## unclosed references tag becomes escaped text, and then a new references
22659 ## tag is auto-generated. The test is wt2html only because it roundtrips with
22660 ## nowiki tags, and the auto-generated references tag is only dropped in
22663 Generate references for unclosed references tag
22671 <p>a<span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
22673 <p><references></p>
22674 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
22678 New reference serializes on its own line
22680 parsoid=wt2wt,html2wt
22685 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22688 #### ----------------------------------------------------------------
22689 #### Parsoid-only testing of Parsoid's impl of LST
22690 #### Not implemented yet, see
22691 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22692 #### ----------------------------------------------------------------
22695 LST Sections: 1. Simple section start and end
22697 parsoid={ "suppressErrors": true }
22699 <section begin="2011-05-16" />
22700 <section end="2014-04-10 (MW 1.23wmf22)" />
22702 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22703 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22706 #--------- Test stripping of empty nodes in template content ----------
22708 Empty LI and TR nodes should be stripped from template content
22713 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22717 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22730 Empty LI and TR nodes should not be stripped from top-level content
22757 Empty TR nodes should not be stripped if they have any attributes set
22759 {{EmptyTRWithHTMLAttrTest}}
22761 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22762 <tr align="center"></tr>
22763 <tr><td>foo</td></tr>
22764 <tr align="center"></tr>
22765 <tr><td>bar</td></tr>
22769 #### ----------------------------------------------------------------
22770 #### The following section of tests are primarily to test
22771 #### wikitext escaping capabilities of Parsoid. Given that
22772 #### escaping can be done any number of ways, the wikitext (input)
22773 #### is always adjusted to reflect how Parsoid adds nowiki
22776 #### We are marking several tests as parsoid-only since the
22777 #### HTML in the result section is different from what the
22778 #### PHP parser generates for it.
22779 #### ----------------------------------------------------------------
22782 #### --------------- Headings ---------------
22784 #### 1. Nested inside html <h1>=foo=</h1>
22785 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22786 #### 3. Nested inside html with wikitext split by html tags
22787 #### 4. No escape needed
22788 #### 5. Empty headings <h1></h1>
22789 #### 6. Heading chars in SOL context
22790 #### ----------------------------------------
22792 Headings: 0. Unnested
22802 <p>=foo<i>a</i>=</p>
22804 <nowiki>=foo=</nowiki>
22806 <nowiki> </nowiki>=foo=
22808 <nowiki>=foo=</nowiki>
22810 =foo''a''<nowiki>=</nowiki>
22813 # New headings and existing headings are handled differently
22815 Headings: 1. Nested inside html
22823 <h1 data-parsoid=''>=foo=</h1>
22824 <h2 data-parsoid=''>=foo=</h2>
22825 <h3 data-parsoid=''>=foo=</h3>
22826 <h4 data-parsoid=''>=foo=</h4>
22827 <h5 data-parsoid=''>=foo=</h5>
22828 <h6 data-parsoid=''>=foo=</h6>
22836 =<nowiki>=foo=</nowiki>=
22837 ==<nowiki>=foo=</nowiki>==
22838 ===<nowiki>=foo=</nowiki>===
22839 ====<nowiki>=foo=</nowiki>====
22840 =====<nowiki>=foo=</nowiki>=====
22841 ======<nowiki>=foo=</nowiki>======
22846 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22855 <nowiki>*</nowiki>bar
22861 <nowiki>=bar=</nowiki>
22865 Headings: 3. Nested inside html with wikitext split by html tags
22869 <h1>=<b>bold</b>foo=</h1>
22871 = ='''bold'''foo= =
22875 Headings: 4a. No escaping needed (testing just h1 and h2)
22886 <h1><i>=</i>foo=</h1>
22906 Headings: 4b. No escaping needed (inside p-tags)
22921 Headings: 5. Empty headings
22925 <h1 data-parsoid='{}'></h1>
22927 <h2 data-parsoid='{}'></h2>
22929 <h3 data-parsoid='{}'></h3>
22931 <h4 data-parsoid='{}'></h4>
22933 <h5 data-parsoid='{}'></h5>
22935 <h6 data-parsoid='{}'></h6>
22945 =====<nowiki/>=====
22947 ======<nowiki/>======
22951 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22961 <nowiki>=a=</nowiki>
22963 <nowiki>=a=</nowiki>
22965 <nowiki>=a=</nowiki>
22969 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22982 <nowiki>=a=</nowiki>
22985 <nowiki>=a=</nowiki>
22988 <nowiki>=a=</nowiki>
22993 Headings: 6c. Heading chars in SOL context (leading newline break)
23001 <nowiki>=b=</nowiki>
23005 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23009 <!--c0--><p>=a=</p>
23011 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23013 <!--c0--><nowiki>=a=</nowiki>
23015 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23019 Headings: 6d. Heading chars in SOL context (No escaping needed)
23029 Headings: 7. Insert a newline between new content and headings
23035 <h2 data-parsoid='{}'>A</h2>
23036 <p data-parsoid='{}'>a</p>
23046 #### --------------- Lists ---------------
23047 #### 0. Outside nests (*foo, etc.)
23048 #### 1. Nested inside html <ul><li>*foo</li></ul>
23049 #### 2. Inside definition lists
23050 #### 3. Only bullets at start should be escaped
23051 #### 4. No escapes needed
23052 #### 5. No unnecessary escapes
23053 #### 6. Escape bullets in SOL position
23054 #### 7. Escape bullets in a multi-line context
23055 #### ----------------------------------------
23058 Lists: 0. Outside nests
23068 <nowiki>*</nowiki>foo
23070 <nowiki>#</nowiki>foo
23072 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23075 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23076 ## to test wikitext escaping, and insignificant whitespace diffs
23077 ## cause PHP parser tests to barf
23079 Lists: 1. Nested inside html (No unnecessary escapes)
23088 <li data-parsoid='{}'>*foo</li>
23089 <li data-parsoid='{}'>#foo</li>
23090 <li data-parsoid='{}'>:foo</li>
23091 <li data-parsoid='{}'>;foo</li>
23099 <li data-parsoid='{}'>*foo</li>
23100 <li data-parsoid='{}'>#foo</li>
23101 <li data-parsoid='{}'>:foo</li>
23102 <li data-parsoid='{}'>;foo</li>
23109 *<nowiki>*foo</nowiki>
23110 *<nowiki>#foo</nowiki>
23111 *<nowiki>:foo</nowiki>
23112 *<nowiki>;foo</nowiki>
23118 #<nowiki>*foo</nowiki>
23119 #<nowiki>#foo</nowiki>
23120 #<nowiki>:foo</nowiki>
23121 #<nowiki>;foo</nowiki>
23125 Lists: 2. Inside definition lists
23129 <dl><dt>;foo</dt></dl>
23130 <dl><dt>:foo</dt></dl>
23133 <dl><dd>:foo</dd></dl>
23137 ; <nowiki>:foo</nowiki>
23139 ; <nowiki>:foo</nowiki>
23146 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23152 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23156 *<nowiki>*foo</nowiki>''it''*bar
23160 Lists: 4. No escapes needed
23173 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23177 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23191 Lists: 5. No unnecessary escapes
23195 <ul><li> bar <span>[[foo]]</span></li></ul>
23196 <ul><li> =bar <span>[[foo]]</span></li></ul>
23197 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23198 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23199 <ul><li> =bar <span>foo]]</span>=</li></ul>
23200 <ul><li> <s></s>: a</li></ul>
23201 <ul><li> <i>* foo</i></li></ul>
23204 * bar <span><nowiki>[[foo]]</nowiki></span>
23206 * =bar <span><nowiki>[[foo]]</nowiki></span>
23208 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23210 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23212 * =bar <span>foo]]</span>=
23220 Lists: 6. Escape bullets in SOL position
23224 <p><!--cmt-->*foo</p>
23226 <!--cmt--><nowiki>*</nowiki>foo
23230 Lists: 7. Escape bullets in a multi-line context
23239 <nowiki>*</nowiki>b
23243 Lists: 8. Escape colons only if not present in tags
23247 <dl><dt>a:b<i>c:d</i></dt></dl>
23249 ; <nowiki>a:b</nowiki>''c:d''
23252 #### --------------- HRs ---------------
23253 #### 1. Single line
23254 #### -----------------------------------
23257 HRs: 1. Single line
23265 ----<nowiki>----</nowiki>
23270 #### --------------- Tables ---------------
23271 #### 1a. Simple example
23272 #### 1b. No escaping needed (!foo)
23273 #### 1c. No escaping needed (|foo)
23274 #### 1d. No escaping needed (|}foo)
23276 #### 2a. Nested in td (<td>foo|bar</td>)
23277 #### 2b. Nested in td (<td>foo||bar</td>)
23278 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23280 #### 3a. Nested in th (<th>foo!bar</th>)
23281 #### 3b. Nested in th (<th>foo!!bar</th>)
23282 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23286 #### 4c. No escaping needed
23287 #### --------------------------------------
23290 Tables: 1a. Simple example
23298 <nowiki>{|</nowiki>
23303 Tables: 1b. No escaping needed
23314 Tables: 1c. No escaping needed
23325 Tables: 1d. No escaping needed
23336 Tables: 2a. Nested in td
23341 <td>foo|bar</td></tr>
23342 <tr><td>x<div>a|b</div></td>
23346 |<nowiki>foo|bar</nowiki>
23348 |x<div><nowiki>a|b</nowiki></div>
23364 Tables: 2b. Nested in td
23370 <td>a<i>b||c</i></td>
23371 <td>a<i><div>b||c</div></i></td>
23372 </tr></tbody></table>
23375 |<nowiki>foo||bar</nowiki>
23376 |a''<nowiki>b||c</nowiki>''
23377 |a''<div><nowiki>b||c</nowiki></div>''
23386 <td>a<i><div>b||c</div></i>
23392 Tables: 2c. Nested in td -- no escaping needed
23408 Tables: 3a. Nested in th
23424 Tables: 3b. Nested in th
23429 <tr><th>foo!!bar</th>
23430 <th><i>foo|bar</i></th>
23431 <th><i>foo!!bar</i></th>
23432 <th><i><span>foo!!bar</span></i></th>
23433 </tr></tbody></table>
23436 !<nowiki>foo!!bar</nowiki>
23437 !''<nowiki>foo|bar</nowiki>''
23438 !''<nowiki>foo!!bar</nowiki>''
23439 !''<span><nowiki>foo!!bar</nowiki></span>''
23448 <th><i>foo!!bar</i>
23450 <th><i><span>foo!!bar</span></i>
23456 Tables: 3c. Nested in th
23461 <tr><th>foo||bar</th>
23462 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23463 </tr></tbody></table>
23466 !<nowiki>foo||bar</nowiki>
23467 !<nowiki>foo||bar</nowiki>
23480 Tables: 4a. Escape -
23496 |<nowiki>-bar</nowiki>
23501 Tables: 4b. Escape +
23517 |<nowiki>+bar</nowiki>
23522 Tables: 4c. No escaping needed
23527 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23528 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23534 <div>a|b</div></td>
23579 Tables: 4d. No escaping needed
23584 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23585 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23586 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23597 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23607 T97430: Don't emit empty nowiki pairs around marker meta tags
23611 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23612 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23614 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23615 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23619 Unclosed xmlish element in table line shouldn't eat end delimiters
23624 <tbody><tr><td> <foo</td>
23625 <td> bar></td></tr>
23642 #### --------------- Links ----------------
23643 #### 1. Quote marks in link text
23644 #### 2. Wikilinks: Escapes needed
23645 #### 3. Wikilinks: No escapes needed
23646 #### 4. Extlinks: Escapes needed
23647 #### 5. Extlinks: No escapes needed
23648 #### --------------------------------------
23650 Links 1. WikiLinks: No escapes needed
23654 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23655 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23656 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23660 [[Foo|x [Foobar] x]]
23662 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23663 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23664 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23669 Links 2. WikiLinks: Escapes needed
23673 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23674 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23675 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23676 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23677 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23678 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23679 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23680 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23681 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23682 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23684 [[Foo|<nowiki>Foobar]</nowiki>]]
23685 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23686 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23687 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23688 [[Foo|<nowiki>|Bar</nowiki>]]
23689 [[Foo|<nowiki>]]bar</nowiki>]]
23690 [[Foo|<nowiki>[[bar</nowiki>]]
23691 [[Foo|<nowiki>x [[ y</nowiki>]]
23692 [[Foo|<nowiki>x ]] y</nowiki>]]
23693 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23695 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23696 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23697 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23698 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23699 <a href="/wiki/Foo" title="Foo">|Bar</a>
23700 <a href="/wiki/Foo" title="Foo">]]bar</a>
23701 <a href="/wiki/Foo" title="Foo">[[bar</a>
23702 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23703 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23704 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23709 Links 3. WikiLinks: No escapes needed
23713 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23714 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23719 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23720 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23725 Links 4. ExtLinks: Escapes needed
23729 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23730 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23731 <p>[http://google.com]</p>
23732 <p>[http://google.com google]</p>
23733 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23734 <p>[<a rel="mw:ExtLink" href="http://google.com" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://google.com"}},"i":0}}]}'>http://google.com</a>]</p>
23736 [http://google.com <nowiki>[google]</nowiki>]
23737 [http://google.com <nowiki>google]</nowiki>]
23739 <nowiki>[http://google.com]</nowiki>
23741 <nowiki>[http://google.com google]</nowiki>
23743 [http://google.com<nowiki>]</nowiki>
23745 [{{echo|http://google.com}}<nowiki>]</nowiki>
23747 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23748 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23749 </p><p>[http://google.com]
23750 </p><p>[http://google.com google]
23751 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23752 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23757 Links 5. ExtLinks: No escapes needed
23761 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23762 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23764 [http://google.com [google]
23766 [[http://google.com]]
23768 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23769 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23774 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23778 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23779 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23780 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23781 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23782 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23783 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23784 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23785 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23786 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23787 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23788 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23789 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23790 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23793 x<nowiki/>http://example.com<nowiki/>y
23794 http://example.com<nowiki/>?x
23795 http://example.com<nowiki/>&x
23796 http://example.com<nowiki/>'x
23797 http://example.com<nowiki/>,x
23798 http://example.com<nowiki/>.x
23799 http://example.com<nowiki/>;x
23800 http://example.com<nowiki/>:x
23801 http://example.com<nowiki/>;x
23802 http://example.com<nowiki/>!x
23803 http://example.com<nowiki/>=x
23804 http://example.com<nowiki/>(x)
23805 http://example.com(x<nowiki/>)
23809 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23814 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23816 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23817 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23818 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23819 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23820 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23826 "http://example.com"
23827 (http://example.com)
23828 (http://example.com) foo
23829 http://example.com,
23830 http://example.com, foo
23833 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23835 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23836 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23837 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23838 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23839 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23844 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23848 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23849 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23851 http://example.com.,;:!?\
23852 -http://example.com:
23854 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23855 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23860 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23864 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23865 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23866 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23870 X<nowiki/>RFC 123<nowiki/>y
23874 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23878 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23879 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23880 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23887 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23888 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23889 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23894 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23898 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23899 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23900 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23904 X<nowiki/>PMID 123<nowiki/>y
23908 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23912 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23913 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23914 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23921 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23922 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23923 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23928 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23932 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23933 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23934 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23937 ISBN 1234567890<nowiki/>1
23938 ISBN 1234567890<nowiki/>x
23939 a<nowiki/>ISBN 1234567890<nowiki/>b
23943 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23947 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23951 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23956 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23960 <p>this is not a link: http://example.com
23963 this is not a link: <nowiki>http://example.com</nowiki>
23967 Links 15. Link trails can't become link prefixes.
23972 <p><a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður" data-parsoid='{"stx":"simple","tail":"-"}'>Söfnuður-</a><a rel="mw:WikiLink" href="00" title="00">00</a></p>
23974 [[Söfnuður]]-[[00]]
23976 <p><a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">Söfnuður-</a><a href="/wiki/00" title="00">00</a>
23980 #### --------------- Quotes ---------------
23981 #### 1. Quotes inside <b> and <i>
23982 #### 2. Link fragments separated by <i> and <b> tags
23983 #### 3. Link fragments inside <i> and <b>
23984 #### 4. No escaping needed
23985 #### --------------------------------------
23987 1a. Quotes inside <b> and <i>
23998 <b>foo'<i>bar'</i>baz</b>
24007 <i>fools'<span> errand</span></i>
24008 <i><span>fool</span>'s errand</i>
24009 '<i>foo</i> bar '<i>baz</i>
24010 a|!*#-:;+-~[]{}b'<i>x</i>
24014 ''<nowiki>''foo''</nowiki>''
24015 ''<nowiki>'''foo'''</nowiki>''
24017 '''<nowiki/>'foo''''
24018 '''<nowiki>''foo''</nowiki>'''
24019 '''<nowiki>'''foo'''</nowiki>'''
24020 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24021 '''foo'''<nowiki/>'s
24027 '''foo'''<nowiki/>'
24028 ''''foo'''<nowiki/>'
24029 ''fools'<span> errand</span>''
24030 ''<span>fool</span>'s errand''
24031 '<nowiki/>''foo'' bar '''baz''
24032 a|!*#-:;+-~[]{}b'''x''
24036 1b. Quotes inside <b> and <i> with other tags on same line
24040 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24041 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24042 <i>a'</i> foo <b><a rel="mw:WikiLink" href="Bar" title="Bar" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[bar]]"}},"i":0}}]}'>bar</a></b>
24043 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24044 '<i>foo</i> <span class="mw-ref" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
24045 '<i>foo</i> <div title="name">test</div>
24046 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24047 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24048 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">test</span></li>
24051 '''a'' foo ''[[bar]]''
24052 ''a''' foo ''[[bar]]''
24053 ''a''' foo '''{{echo|[[bar]]}}'''
24054 [[foo]] x'''[[bar]]''
24055 '''foo'' <ref>test</ref>
24056 '''foo'' <div title="name">test</div>
24057 '''foo'' and <br> bar
24062 2. Link fragments separated by <i> and <b> tags
24066 <p>[[<i>foo</i>hello]]</p>
24067 <p>[[<b>foo</b>hello]]</p>
24069 [[''foo''<nowiki>hello]]</nowiki>
24071 [['''foo'''<nowiki>hello]]</nowiki>
24074 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24075 # this is one of the shortcomings of this format
24077 3. Link fragments inside <i> and <b>
24081 <p><i>[[foo</i>]]</p>
24082 <p><b>[[foo</b>]]</p>
24084 ''[[foo''<nowiki>]]</nowiki>
24086 '''[[foo'''<nowiki>]]</nowiki>
24090 4. No escaping needed
24094 <p>'<span><i>bar</i></span>'
24095 '<span><b>bar</b></span>'
24099 '<span>''bar''</span>'
24100 '<span>'''bar'''</span>'
24104 #### ----------- Paragraphs ---------------
24105 #### 1. No unnecessary escapes
24106 #### --------------------------------------
24109 1. No unnecessary escapes
24113 <p>bar <span>[[foo]]</span>
24114 </p><p>=bar <span>[[foo]]</span>
24115 </p><p>[[bar <span>[[foo]]</span>
24116 </p><p>]]bar <span>[[foo]]</span>
24117 </p><p>=bar <span>foo]]</span>=
24120 bar <span><nowiki>[[foo]]</nowiki></span>
24122 =bar <span><nowiki>[[foo]]</nowiki></span>
24124 [[bar <span><nowiki>[[foo]]</nowiki></span>
24126 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24128 =bar <span>foo]]</span><nowiki>=</nowiki>
24131 #### ----------------------- PRE --------------------------
24132 #### 1. Leading whitespace in SOL context should be escaped
24133 #### ------------------------------------------------------
24135 1. Leading whitespace in SOL context should be escaped
24158 <nowiki> </nowiki>a
24160 <nowiki> </nowiki> a
24164 <nowiki> </nowiki> a
24166 <nowiki> </nowiki>a
24169 <nowiki> </nowiki>b
24192 2. Leading whitespace in non-indent-pre contexts should not be escaped
24196 <p>foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
24197 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24198 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><i>a</i>
24208 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24227 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24231 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
24233 [[File:Foobar.jpg|thumb|caption]]
24237 5. Nowiki escaping should account for indent-pres
24247 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24260 #### --------------- Behavior Switches --------------------
24263 1. Valid behavior switches should be escaped
24270 <nowiki>__TOC__</nowiki>
24271 ''<nowiki>__TOC__</nowiki>''
24275 2. Invalid behavior switches should not be escaped
24286 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24288 Behavior switches should be SOL-transparent
24292 <meta property="mw:PageProp/toc" />
24294 <!-- this one's bogus -->
24297 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24299 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24303 <!-- this one's bogus -->
24312 #### --------------- HTML tags ---------------
24315 #### 3. multi-line html tag
24316 #### 4. extension tags
24317 #### -----------------------------------------
24323 <a href="http://google.com">google</a>
24325 <a href="http://google.com">google</a>
24333 <ul><li> <div>foo</div></li>
24334 <li> <div style="color:red">foo</div></li>
24335 <li> <td></li></ul>
24338 * <nowiki><div>foo</div></nowiki>
24339 * <nowiki><div style="color:red">foo</div></nowiki>
24340 * <nowiki><td></nowiki>
24344 3. multi-line html tag
24363 <p><ref>foo</ref>
24364 </p><p><ref>bar
24365 </p><p>baz</ref>
24368 <nowiki><ref>foo</ref></nowiki>
24370 <nowiki><ref>bar</nowiki>
24372 baz<nowiki></ref></nowiki>
24375 #### --------------- Others ---------------
24381 <p><nowiki>foo</nowiki>
24384 <nowiki>foo</nowiki>
24387 ## The quote-char in the input is necessary for triggering the bug
24389 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24398 #----------- End of wikitext escaping tests --------------
24402 Tag-like HTML structures are passed through as text
24424 </p><p>1<d e>f
24429 HTML tag with necessary entities in attributes
24431 <span title="&amp;">foo</span>
24433 <p><span title="&amp;">foo</span>
24438 HTML tag with 'unnecessary' entity encoding in attributes
24440 <span title="&">foo</span>
24442 <p><span title="&">foo</span>
24447 HTML tag with broken attribute value quoting
24449 parsoid=wt2html,html2html
24451 <span title="Hello world>Foo</span>
24453 <p><span title="Hello world">Foo</span>
24456 <p><span title="Hello world">Foo</span></p>
24460 Self-closed tag with broken attribute value quoting
24462 parsoid=wt2html,html2html
24464 <div title="Hello world />Foo
24466 <div title="Hello world"></div>
24469 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24473 Table with broken attribute value quoting
24475 parsoid=wt2html,html2html
24478 | title="Hello world|Foo
24483 <td title="Hello world">Foo
24489 <td title="Hello world">Foo
24495 Table with broken attribute value quoting on consecutive lines
24497 parsoid=wt2html,html2html
24500 | title="Hello world|Foo
24501 | style="color:red|Bar
24506 <td title="Hello world">Foo
24508 <td style="color:red">Bar
24514 <td title="Hello world">Foo
24515 </td><td style="color: red">Bar
24516 </td></tr></tbody></table>
24521 Accept empty td cell attribute
24524 | align="center" | foo || |
24529 <td align="center"> foo </td>
24536 Non-empty attributes in th-cells
24539 ! Foo !! style="color: red" | Bar
24545 <th style="color: red"> Bar
24551 Accept empty attributes in th-cells
24566 Empty table rows go away
24587 ### Parsoid-centric tests for testing RTing of inter-element separators
24588 ### Edge cases not tested by existing parser tests and specific to
24589 ### Parsoid-specific serialization strategies.
24593 RT-ed inter-element separators should be valid separators
24605 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24609 # Parsoid-only since PHP parser relies on Tidy for correct output
24611 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24625 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24626 <p>bar</p></small></td></tr>
24630 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo<small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></small></td></tr>
24634 # Note that the "style" attribute is really a template parameter here.
24635 # The = would have to be {{=}} if you wanted the literal.
24637 Empty TD followed by TD with tpl-generated attribute
24642 |{{echo|style='color:red'}}|foo
24656 Indented table with an empty td
24674 ## We have some newline diffs RT-ing this edge case
24675 ## and it is not important enough -- we seem to be emitting
24676 ## at most 2 newlines after a </tr> and this is unrelated to
24677 ## the issue from T85627 that this is testing.
24679 Indented table with blank lines in between (T85627)
24698 Indented block & table
24712 <div data-parsoid='{"stx":"html"}'>foo</div>
24714 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24719 Indent and comment before table row
24734 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24735 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24739 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24741 Empty TR followed by a template-generated TR
24747 {{echo|<tr><td>foo</td></tr>}}
24753 <tr about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr><td>foo</td></tr>"}},"i":0}}]}'>
24758 ## PHP and parsoid output differ for this, and since this is primarily
24759 ## for testing Parsoid's serializer, marking this Parsoid only
24761 Empty TR followed by mixed-ws-comment line should RT correctly
24777 <!--c--> </tr><!--d-->
24783 Multi-line image caption generated by templates with/without trailing newlines
24785 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24786 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24788 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a><figcaption>foo\n<span about="#mwt9" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span about="#mwt10" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span about="#mwt11" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span></figcaption></figure>
24789 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a><figcaption>foo\n<span about="#mwt12" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span about="#mwt13" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span about="#mwt14" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span>\n\n</figcaption></figure>
24793 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24797 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24799 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24801 <includeonly>foo</includeonly>
24809 ## PHP emits broken html for this, and since this is primarily
24810 ## a Parsoid serializer test, marking this Parsoid only
24812 Improperly nested inline or quotes tags with whitespace in between
24814 <span> <s>x</span> </s>
24817 <p><span> <s>x</s></span><s> </s>
24818 <b> <i>x</i></b><i> </i>
24823 Encapsulate protected attributes from wt
24825 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24827 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
24831 <div data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">foo</div>
24833 <table data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">
24834 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
24838 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24839 ## Having nested or stray pre tags results in the attempt to add duplicates,
24840 ## causing an assertion fail. This test tries to prevent that situation.
24842 Ensure ParagraphWrapper can deal with stray closing pre tags
24852 1. Ensure fostered text content is wrapped in element nodes
24856 <table>hi</table><table>ho</table>
24865 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24867 parsoid=wt2html,wt2wt
24876 <tbody><tr><td> a</td></tr>
24881 Encapsulation properly handles null DSR information from foster box
24883 parsoid=wt2html,wt2wt
24885 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24887 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>foo<tr><td>bar</td></tr></table>"}},"i":0}}]}">foo</span><table><tbody><tr><td>bar</td></tr></tbody></table>
24891 1. Encapsulate foster-parented transclusion content
24893 parsoid=wt2wt,wt2html
24895 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24897 <p typeof="mw:Transclusion" data-mw="{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<tr><td>bar</td></tr>"}},"i":0}},"</table>"]}">foo</p><table>
24907 2. Encapsulate foster-parented transclusion content
24909 parsoid=wt2wt,wt2html
24911 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24913 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}},"</div><tr><td>bar</td></tr></table>"]}">foo</div>
24924 3. Encapsulate foster-parented transclusion content
24926 parsoid=wt2wt,wt2html
24928 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24930 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div><tr><td>"}},"i":0}},"bar</td></tr></table>"]}">
24943 4. Encapsulate foster-parented transclusion content
24945 parsoid=wt2wt,wt2html
24947 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24949 <div typeof="mw:Transclusion" data-mw="{"parts":["<table><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div><tr><td>"}},"i":0}},"bar</td></tr></table>"]}">
24962 5. Encapsulate foster-parented transclusion content
24964 parsoid=wt2wt,wt2html
24966 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24968 <p typeof="mw:Transclusion" data-mw="{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo"}},"i":0}},"</tr></table>"]}">foo</p>
24983 6. Encapsulate foster-parented transclusion content
24985 parsoid=wt2wt,wt2html
24987 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24989 <p typeof="mw:Transclusion" data-mw="{"parts":["<table><tr><td><div><p>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo</p></div></td>foo</tr></table>"}},"i":0}}]}">foo</p>
25005 7. Encapsulate foster-parented transclusion content
25007 parsoid=wt2wt,wt2html
25009 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25011 <p typeof="mw:Transclusion" data-mw="{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<p>foo</p>"}},"i":0}},"<td>bar</td></table>"]}">foo</p>
25021 # Note that the wt is broken on purpose: the = should be {{=}} if you
25022 # don't want it to be a template parameter key.
25024 8. Encapsulate foster-parented transclusion content
25026 parsoid=wt2wt,wt2html
25029 }}{|{{echo|style='color:red'}}
25034 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25036 <p typeof="mw:Transclusion" data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"'color:red'"}},"i":0}},"\n|-\n|b\n|}"]}'>{{{1}}}</p>
25047 9. Encapsulate foster-parented transclusion content
25049 parsoid=wt2wt,wt2html
25051 <table>{{echo|hi</table>hello}}
25053 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["<table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi</table>hello"}},"i":0}}]}' data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"pi":[[{"k":"1"}]]}'>hi</p><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><p about="#mwt2">hello</p>
25057 Table in fosterable position
25068 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"OpenTable","href":"./Template:OpenTable"},"params":{},"i":0}},"\n<div>\n"]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[]]}'></div><span about="#mwt1">
25070 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25076 # Parsoid only for bug 64747
25078 Properly encapsulate empty-content transclusions in fosterable positions
25086 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["<table>\n",{"template":{"target":{"wt":"#if:","function":"#if"},"params":{"1":{"wt":"\n<td>foo</td>\n"}},"i":0}},"\n</table>"]}' data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}'>
25092 Always encapsulate foster box when template range is expanded to table
25105 T115289: Unclosed table
25107 {{echo|<table>}}<!--c-->[[Category:Two]]
25109 <link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"<!--c-->[[Category:Two]]"]}'/><table about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><!--c--></table>
25113 T115289: Don't migrate newlines out of tables with fostered content
25115 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25117 <link rel="mw:PageProp/Category" href="./Category:One" about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:One"},"sa":{"href":"Category:One"},"fostered":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><td></td>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr>[[Category:One]]"}},"i":0}},"<!--c-->[[Category:Two]]"]}'/><link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt2"/><table about="#mwt2" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr><td></td></tr><tr><!--c--></tr></tbody></table>
25121 T73074: More fostering fun
25123 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25125 <link rel="mw:PageProp/Category" href="./Category:Two" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"fostered":true}'/><table data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"stx":"html"}'></td></tr><tr about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr>"}},"i":0}},"<!--c-->[[Category:Two]]"]}'><!--c--></tr></tbody></table>
25129 Support <object> element with .data attribute
25133 <object data="test.swf"></object>
25135 <object data="test.swf"></object>
25139 Don't block XML namespace declaration
25141 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25143 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25146 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25149 # -----------------------------------------------------------------
25150 # The following section of tests are primarily to spec requirements
25151 # around Parsoid's serialization (old, new, edited content)
25153 # All these tests are marked Parsoid html2wt and html2html only
25154 # ----------------------------------------------------------------
25157 Ignore rel attribute in a-tags during serialization to url-links
25161 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25162 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25163 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25165 http://en.wikipedia.org/wiki/Foobar
25166 http://en.wikipedia.org/wiki/Foobar
25167 http://en.wikipedia.org/wiki/Foobar
25170 # 'mi' is a localinterwiki prefix as well as a language
25172 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
25176 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25183 New wikilinks should be serialized properly
25187 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25188 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25189 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25190 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25191 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25195 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25196 http://en.wikipedia.org/wiki/Foo
25197 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25201 New wiki links (href variations)
25205 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25206 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25207 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25208 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25213 [[Toxine bactérienne]]
25217 New wiki links (content string variations)
25221 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25222 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25223 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25227 [[Foo_bar|./Foo_bar]]
25231 New category links (href variations)
25235 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25236 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25237 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25239 [[Category:Toxine bactérienne]]
25240 [[Category:Toxine bactérienne]]
25241 [[Category:Toxine bactérienne]]
25245 New sol transparent links don't need indent-pre nowiki protection
25250 <link rel="mw:PageProp/redirect" href="./Main_Page">
25251 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25252 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25254 #WEITERLEITUNG [[Main Page]]
25255 <!-- this is good --> [[Category:Good]]
25256 <!-- this is great --> [[Kategorie:Great]]
25260 New interlanguage links (href variations)
25264 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25265 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25266 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25268 [[es:Toxine bactérienne]]
25269 [[es:Toxine_bactérienne]]
25270 [[es:Toxine_bactérienne]]
25274 Image: Modifying size of an image (1)
25277 "modes": ["wt2wt"],
25279 ["img[height]", "attr", "height", "22"],
25280 ["img[width]", "attr", "width", "200"]
25284 [[Image:Foobar.jpg|230x230px]]
25286 [[Image:Foobar.jpg|200x200px]]
25290 Image: Modifying size of an image (2)
25293 "modes": ["wt2wt"],
25295 ["img[height]", "attr", "height", "100"],
25296 ["img[width]", "attr", "width", "500"]
25300 [[Image:Foobar.jpg|230x230px]]
25302 [[Image:Foobar.jpg|500x500px]]
25305 # Change in size is ignored so long as class='mw-default-size'
25307 Image: Modifying size of an image (3)
25310 "modes": ["wt2wt"],
25312 ["figure[class]", "removeClass", "mw-default-size"],
25313 ["figure img", "attr", "height", "19"],
25314 ["figure img", "attr", "width", "170"]
25318 [[Image:Foobar.jpg|thumb]]
25320 [[Image:Foobar.jpg|thumb|170x170px]]
25324 Image: Modifying alignment of an image (bug 48665)
25327 "modes": ["wt2wt"],
25329 ["figure[class]", "removeClass", "mw-halign-right"],
25330 ["figure[class]", "addClass", "mw-halign-left"]
25334 [[Image:Foobar.jpg|thumb|caption|right]]
25336 [[Image:Foobar.jpg|thumb|caption|left]]
25340 Image: Modifying mw-default-size of an frameless image (bug 62805)
25343 "modes": ["wt2wt"],
25345 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25349 [[Image:Foobar.jpg|frameless|right]]
25351 [[Image:Foobar.jpg|frameless|right|220x220px]]
25355 Image: Modifying valign of an image (bug 49221)
25358 "modes": ["wt2wt"],
25360 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25361 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25365 [[File:Foobar.jpg|20px|middle]]
25367 [[File:Foobar.jpg|20px|text-top]]
25371 Image: Modifying alt attribute of an image (bug 56400)
25374 "modes": ["wt2wt"],
25376 ["img[alt]", "attr", "alt", "some alternate edited text"]
25380 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25382 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25386 Image: Modifying caption of an image
25389 "modes": ["wt2wt"],
25391 ["figcaption", "text", "new caption"]
25395 [[Image:Foobar.jpg|thumb|original caption]]
25397 [[Image:Foobar.jpg|thumb|new caption]]
25401 Image: empty alt attribute (bug 48924)
25405 [[File:Foobar.jpg|thumb|alt=|bar]]
25407 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"alt","ak":"alt="},{"ck":"caption","ak":"bar"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img alt="" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"alt":"","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=","resource":"File:Foobar.jpg"}}'/></a><figcaption>bar</figcaption></figure>
25411 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25417 <figure class="mw-default-size mw-halign-right" typeof="mw:Image/Thumb"><a href="./Imagen:Foobar.jpg"><img resource="./Imagen:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="180"/></a></figure>
25419 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25423 Image: Block level image should have \n before and after
25426 [[File:Foobar.jpg|right|thumb|150x150px]]
25430 <figure class="mw-halign-right" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/150px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="17" width="150"/></a></figure>
25435 Image: New block level image should have \n before and after (existing content)
25438 [[File:Foobar.jpg|right|thumb|150x150px]]
25442 <figure class="mw-halign-right" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"right","ak":"right"},{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"150x150px"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/150px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="17" width="150" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"17","width":"150"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure>
25447 Image: upright option (parsoid)
25449 [[File:Foobar.jpg|thumb|upright|caption]]
25450 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25451 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25453 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/170px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="19" width="170"/></a><figcaption>caption</figcaption></figure>
25454 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/110px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="12" width="110"/></a><figcaption>caption</figcaption></figure>
25455 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="57" width="500"/></a><figcaption>caption</figcaption></figure>
25459 Image: upright option is ignored on inline and frame images (parsoid)
25461 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25463 <p><span typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="57" width="500"/></a></span></p>
25467 Image: from basic HTML (1)
25471 <span typeof="mw:Image">
25472 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25475 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25479 Image: from basic HTML (2)
25483 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25485 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25489 Image: from basic HTML (3)
25493 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25495 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25499 Image: from basic HTML (4)
25503 <img src="./File:Foobar.jpg">
25505 [[File:Foobar.jpg|link=]]
25509 Image: Invalid title as link
25511 [[File:Foobar.jpg|link=<]]
25513 <p><a href="/wiki/File:Foobar.jpg" class="image" title="link=<"><img alt="link=<" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
25516 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=<"}]}' data-mw='{"caption":"link=&lt;"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
25520 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25525 <li><p>foo</p></li>
25532 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25536 <ul> <li>foo</li></ul>
25542 Don't strip leading whitespace when handling indent-pre suppressing tags
25547 <tr><td> indented row</td></tr>
25550 <b>This is very bold of you!</b>
25553 indented cell (no pre-wrapping!)
25563 '''This is very bold of you!'''
25567 indented cell (no pre-wrapping!)
25575 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25597 <nowiki> </nowiki></span>bar2
25600 <nowiki> </nowiki><span>bar</span>
25603 <nowiki> </nowiki><span>foo</span>
25608 Lists: Dont insert newlines in a serialized list item.
25612 <ul><li>a<br>b</li><li>c</li></ul>
25619 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25622 "modes": ["html2wt"],
25623 "scrubWikitext": false
25626 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25627 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25629 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25630 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25632 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25634 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25636 == hello there [[Category:A1]] ==
25638 == [[Category:A2]] hi pal ==
25640 == <!--foo--> [[Category:A3]] how goes it ==
25642 == it goes well [[Category:A4]] <!--bar--> ==
25644 ==howdy [[Category:A5]]==
25650 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25653 "modes": ["html2wt"],
25654 "scrubWikitext": true
25657 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25658 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25660 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25661 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25663 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25671 <!--foo--> [[Category:A3]]
25676 [[Category:A4]] <!--bar-->
25684 Headings: Don't hoist metas that come from templates
25687 "modes": ["html2wt"],
25688 "scrubWikitext": true
25691 <h2><span about="#mwt1" typeof="mw:Transclusion" data-parsoid="{}" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo [[Category:Foo]]"}},"i":0}}]}'>foo </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" data-parsoid="{}" /></h2>
25693 == {{echo|foo [[Category:Foo]]}} ==
25697 Headings: Category in ref isn't hoisted
25700 "modes": ["html2wt"],
25701 "scrubWikitext": true
25704 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
25706 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">bar <link rel="mw:PageProp/Category" href="./Category:Baz" /> </span></li></ol>
25709 [[Category:Baz]] </ref> ==
25715 Parsoid: Serialize positional parameters with = in them as named parameter
25719 <p about="#mwt1" typeof="mw:Transclusion"
25720 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25722 <p about="#mwt1" typeof="mw:Transclusion"
25723 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25725 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25726 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25727 <p data-parsoid='{"pi":[[{"k":"1"},{"k":"2"}]]}' about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"},"2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25731 {{echo|1=f=oo|2=bar}}
25733 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25734 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25735 {{echo|<nowiki>f=oo</nowiki>|bar}}
25739 Parsoid: Serialize positional parameters with = in extlink as named parameter
25743 <p><a rel="mw:ExtLink" href="http://stuff?is=ok" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://stuff?is=ok"}},"i":0}}]}'>http://stuff?is=ok</a></p>
25745 {{echo|1=http://stuff?is=ok}}
25749 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25753 <div>a<p>b</p></div>
25774 Substrings resembling wikitext in hrefs should not get nowiki escapes
25778 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25784 Enforce single-line context in the serializer
25791 <h2> hi <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bogus","href":"./Template:Bogus"},"params":{"1":{"wt":"there\nyou"}},"i":0}}]}'>there</span><span about="#mwt1">
25792 </span><span about="#mwt1">you</span> </h2>
25794 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
25796 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">hello
25797 there</span></li></ol>
25809 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25816 </tbody></table></dd></dl>
25820 == hi {{bogus|there
25831 * foo '''bar''' baz
25843 Serialize new placeholder space without spans
25847 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25849 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25851 <span typeof="mw:Extension/ref" data-mw="{"name":"ref","body":{"html":"foo<span typeof=\"mw:Placeholder\">&nbsp;</span>: bar"}}"><sup>[1]</sup></span>ok</p>
25857 <ref>foo : bar</ref>ok
25861 #-----------------------
25862 # Tag minimization tests
25863 #-----------------------
25866 1. I/B quote minimization: wikitext-only tags should be combined
25870 <p><i>A</i><i>B</i></p>
25871 <p><b>A</b><b>B</b></p>
25872 <p><i>A</i><b><i>B</i></b></p>
25873 <p><b>A</b><i><b>B</b></i></p>
25874 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25875 <p><i><b>A</b></i><i><b>B</b></i></p>
25876 <p><i><b>A</b></i><b><i>B</i></b></p>
25877 <p><b><i>A</i></b><i><b>B</b></i></p>
25897 2. I/B quote minimization: wikitext and html tags should not be combined
25901 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25902 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25906 ''A''<nowiki/>'''<i>B</i>'''
25910 3. I/B quote minimization: templated content stops minimization
25914 <p><i>A</i><i about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''B''"}},"i":0}}]}'>B</i>
25915 <p><i>A</i><b about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"'''''B'''''"}},"i":0}}]}'><i>B</i></b>
25917 ''A''{{echo|''B''}}
25919 ''A''{{echo|'''''B'''''}}
25923 4. I/B quote minimization: new content should be mimimized with adjacent old content
25927 <p><i>A</i><i>B</i></p>
25928 <p><b>A</b><b>B</b></p>
25929 <p><i>A</i><b><i>B</i></b></p>
25939 5a. Merge adjacent quote nodes if they've been edited
25942 "modes": ["wt2wt", "selser"],
25944 ["p", "contents", "remove", ":contains('b')"]
25954 5b. Merge adjacent quote nodes if they've been edited
25957 "modes": ["wt2wt", "selser"],
25963 ''a''<span id="x">b</span>''c''
25969 1. Merge adjacent link nodes as long as at least one element is new
25972 "modes": ["html2wt"],
25973 "scrubWikitext": true
25976 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25977 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25978 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25982 [[Football|Foot]][[Football|ball]]
25986 2. Merge adjacent link nodes and enable additional normalizations
25989 "modes": ["html2wt"],
25990 "scrubWikitext": true
25993 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25995 [[Football|''Football'']]
25999 3. Don't merge adjacent link nodes if scrubWikitext is false
26002 "modes": ["html2wt"],
26003 "scrubWikitext": false
26006 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26008 [[Football|Foot]][[Football|ball]]
26011 #------------------------------
26012 # End of tag minimization tests
26013 #------------------------------
26016 Bug 54262: New entities
26020 <span typeof="mw:Entity"> </span>
26025 ## Note that there is no wikitext output for 'unknownproperty' ##
26026 ## Unknown magic words are silently dropped ##
26033 <meta property='mw:PageProp/toc' />
26034 <meta property='mw:PageProp/notoc' />
26035 <meta property='mw:PageProp/forcetoc' />
26036 <meta property='mw:PageProp/index' />
26037 <meta property='mw:PageProp/noindex' />
26038 <meta property='mw:PageProp/nogallery' />
26039 <meta property='mw:PageProp/noeditsection' />
26040 <meta property='mw:PageProp/notitleconvert' />
26041 <meta property='mw:PageProp/nocontentconvert' />
26042 <meta property='mw:PageProp/unknownproperty' />
26052 __NOCONTENTCONVERT__
26056 Consecutive <pre>s should not get merged
26058 parsoid=html2wt,html2html
26060 <pre>a</pre><pre>b</pre>
26088 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26092 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26094 [[Special:BookSources/1234567890|ISBN 1234567895]]
26098 Edited RFC links not serializable as RFC links should serialize as extlinks
26102 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26104 [//tools.ietf.org/html/rfc123 New RFC]
26108 Edited PMID links not serializable as PMID links should serialize as extlinks
26112 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26114 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26118 WTS of autolinks with trailing/surrounding context
26122 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26123 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26124 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26125 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26126 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26127 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26129 http://cscott.net'''foo'''
26131 http://cscott.net<b>foo</b>
26133 '''http://cscott.net'''
26135 '''http://cscott.net '''
26137 '''http://cscott.net<nowiki/>x'''
26139 http://cscott.net<nowiki/>x
26143 WTS of autolinks with nowikis (round-trip)
26145 x<nowiki/>http://cscott.net<nowiki/>x
26147 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26150 # this is the "easy" test because it leaves in place all the
26151 # data-parsoid information indicating this is an autolink
26153 WTS of autolinks with escapes (editing)
26156 "modes": ["wt2wt"],
26158 [ "meta", "remove" ]
26162 x<nowiki/>http://cscott.net<nowiki/>x
26164 x<nowiki/>http://cscott.net<nowiki/>x
26168 WTS of edited autolink-like text (T103364)
26171 "modes": ["wt2wt"],
26173 [ "span[typeof]", "removeAttr", "typeof" ]
26177 Not a link: <nowiki>http://example.com</nowiki>.
26179 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26183 WTS of newly-authored autolink-like text (T103364)
26187 <p>http://example.com is not a link.</p>
26189 <nowiki>http://example.com</nowiki> is not a link.
26193 WTS of autolink-like text after an autolink (T108563)
26197 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26199 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26203 Magic links inside links (not autolinked)
26205 [[Foo|http://example.com]]
26208 [[Foo|ISBN 123456789x]]
26210 [http://foo.com http://example.com]
26211 [http://foo.com RFC 1234]
26212 [http://foo.com PMID 1234]
26213 [http://foo.com ISBN 123456789x]
26215 <p><a href="/wiki/Foo" title="Foo">http://example.com</a> <a href="/wiki/Foo" title="Foo">RFC 1234</a> <a href="/wiki/Foo" title="Foo">PMID 1234</a> <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a></p>
26216 <p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a> <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
26218 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26219 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26220 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26221 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26223 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26224 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26225 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26226 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26230 Magic links inside image captions (autolinked)
26232 [[File:Foobar.jpg|thumb|http://example.com]]
26233 [[File:Foobar.jpg|thumb|RFC 1234]]
26234 [[File:Foobar.jpg|thumb|PMID 1234]]
26235 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26237 <div class="thumb tright">
26238 <div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
26239 <div class="thumbcaption">
26240 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26241 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26244 <div class="thumb tright">
26245 <div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
26246 <div class="thumbcaption">
26247 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26248 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26251 <div class="thumb tright">
26252 <div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
26253 <div class="thumbcaption">
26254 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26255 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26258 <div class="thumb tright">
26259 <div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
26260 <div class="thumbcaption">
26261 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26262 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26266 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
26267 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 1234</a></figcaption></figure>
26268 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></figcaption></figure>
26269 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/123456789X" rel="mw:WikiLink">ISBN 123456789x</a></figcaption></figure>
26273 WTS of magic word text (T109371)
26278 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26279 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26281 <nowiki>RFC 1234</nowiki>
26283 [http://foo.com RFC 1234]
26289 Edited Redirect link should emit a non-piped wikitext link
26293 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26299 T75121: Infer extension name from typeOf if data-mw is not present
26301 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26303 <div typeOf="mw:Extension/foo"></div>
26308 # Note that the <p> wrapping isn't present in PHP parser output
26309 # The important thing for this test is that P-wrapping doesn't
26310 # interfere with the <nowiki> protection for leading - in <td>
26311 # (which isn't necessary for <th>).
26313 T88318: p-wrapped dash in table.
26315 parsoid=html2wt,wt2wt
26318 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26319 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26320 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26327 |<nowiki>-</nowiki>
26328 |<nowiki>- </nowiki>
26347 <td><small>-</small></td>
26359 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26364 <td id='mwAc'>foo</td>
26365 <td id='serialize-this'>bar</td>
26370 | id="serialize-this" |bar
26375 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26379 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26381 <div id="hello">ok</div>
26388 "modes": ["wt2wt"],
26390 [ "#xyz", "before", "<b>before</b> stuff " ],
26391 [ "#xyz", "after", " stuff <i>after</i>" ],
26392 [ "#xyz", "html", "x <b>y</b> z" ]
26396 <span id="xyz">hello</span>
26398 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26402 Never serialize a-tag as html, regardless of what data-parsoid has to say
26404 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26406 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26411 ## SSS FIXME: This is broken output nevertheless.
26412 ## What might be a reasonable non-broken output for this?
26413 ## This is an edge case unlikely to be seen in production
26414 ## that I am not wasting more time on this right now.
26416 Never serialize a-tag as html, no matter what attributes it has
26418 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26420 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26422 [http://boo.org http://boohoo.org]
26425 # Misnested is an indication that selser can reuse the source but these have
26426 # shown to sneak through on occasion. See T101768.
26427 # The original wikitext here is: [http://test.com [[one]] two three]
26429 Strip span tags added to mark misnested links
26433 <p data-parsoid='{}'><a rel="mw:ExtLink" href="http://test.com" data-parsoid='{"targetOff":17,"contentOffsets":[17,34]}'></a><a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"simple","a":{"href":"./One"},"sa":{"href":"one"},"misnested":true}'>one</a><span data-parsoid='{"misnested":true}'> two three</span></p>
26435 [http://test.com][[one]] two three
26439 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26443 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span><table about="#mwt2" typeof="mw:Transclusion mw:ExpandedAttrs" data-parsoid='{"a":{"{{echo|c\n{{!}}d\n}}":null},"sa":{"{{echo|c\n{{!}}d\n}}":""},"firstWikitextNode":"table","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c\n{{!}}d\n"}},"i":0}},"\n|}"]}'>
26455 ## This test verifies the presence and computation of this attribute indirectly
26456 ## by making an edit and ensuring that the serialization is correct (which it would be
26457 ## only if firstWikitextNode is properly set).
26459 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26462 "modes": ["wt2wt"],
26464 [ "div#x", "remove" ],
26465 [ "div", "before", "<div>new</div>" ]
26469 <div id="x">foo</div>
26471 {{echo|<div>boo</div>
26479 {{echo|<div>boo</div>
26485 # --------------------------------------------
26486 # Tests spec'ing wikitext serialization norms |
26487 # --------------------------------------------
26490 1. Categories should always be serialized on their own line
26494 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26502 2. Categories that are part of templates should not introduce a line break
26504 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26506 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span>bar</span> [[Category:baz]]"}},"i":0}}]}'>bar</span><span about="#mwt1"> </span><link rel="mw:PageProp/Category" href="./Category:Baz" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:baz"}}'/> bar</p>
26509 # Careful while editing these next 2 tests. There are \u200f characters
26510 # before and after the <link> tags in the HTML and following some
26511 # of the categories in wikitext
26512 # Do not remove these characters in edits.
26514 # As part of the serialization, these bidi characters will get stripped.
26516 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26519 "modes": ["html2wt"],
26520 "scrubWikitext": true
26523 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26524 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26527 [[קטגוריה: שיטות משפט]]
26531 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26534 "modes": ["html2wt"],
26535 "scrubWikitext": true
26538 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26545 Lists: Add space after bullets
26552 <li><span> baz</span></li>
26557 * <span> baz</span>
26561 1. Headings: Add space before/after == (T53744)
26568 <h2><span> baz</span></h2>
26576 == <span> baz</span> ==
26580 2. Headings: Add space before/after == even after hoisted content
26583 "modes": ["html2wt"],
26584 "scrubWikitext": true
26587 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26595 1. Headings: suppress newly created empty headings
26598 "modes": ["html2wt"],
26599 "scrubWikitext": true
26607 2. Headings: don't suppress empty headings if scrubWikitext is false
26617 3. Headings: suppress empty headings on edits
26620 "modes": ["selser"],
26621 "scrubWikitext": true,
26627 ==<span id="x">foo</span>==
26632 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26635 "modes": ["html2wt"],
26636 "scrubWikitext": true
26639 <h2>foo<br/>bar</h2>
26640 <h2>foo <span><br/>bar</span> baz</h2>
26644 == foo <span> bar</span> baz ==
26648 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26651 "modes": ["html2wt"],
26652 "scrubWikitext": false
26655 <h2>foo<br/>bar</h2>
26661 1. WT Quote Tags: suppress newly created empty style tags
26664 "modes": ["html2wt"],
26665 "scrubWikitext": true
26673 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26679 ''<nowiki/>'''''<nowiki/>'''
26683 3. WT Quote Tags: suppress empty style tags on edits
26686 "modes": ["selser"],
26687 "scrubWikitext": true,
26693 '''<span id="x">foo</span>'''
26698 1. Anchors: suppress newly created empty anchors
26701 "modes": ["html2wt"],
26702 "scrubWikitext": true
26705 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26710 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26713 "modes": ["html2wt"],
26714 "scrubWikitext": false
26717 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26723 3. Anchors: suppress empty anchors on edits
26726 "modes": ["selser"],
26727 "scrubWikitext": true,
26733 [[Test|<span id="x">foo</span>]]
26738 3a. Anchors: do not suppress numbered extlinks
26741 "modes": ["wt2wt"],
26742 "scrubWikitext": true
26747 <a rel="mw:ExtLink" href="http://foo.com"></a>
26751 3b. Anchors: do not suppress numbered extlinks
26754 "modes": ["wt2wt"],
26755 "scrubWikitext": true,
26761 [http://foo.com <span id="x">foo</span>]
26767 Normalizations should be restricted to edited content
26770 "modes": ["selser"],
26771 "scrubWikitext": true,
26773 [ "h1", "before", "<i></i>"]
26787 1. Multiple normalizations (html2wt)
26790 "modes": ["html2wt"],
26791 "scrubWikitext": true
26795 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26796 </a><b><i></i></b>x</p>
26805 2. Multiple normalizations (selser)
26808 "modes": ["selser"],
26809 "scrubWikitext": true,
26811 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26815 <span id="x">foo</span>
26817 <span id="x">foo</span>
26823 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26826 "modes": ["html2wt"],
26827 "scrubWikitext": true
26839 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26846 <nowiki> </nowiki>hi
26848 <nowiki> </nowiki> hello
26852 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26855 "modes": ["html2wt"],
26856 "scrubWikitext": true
26865 baz bang</td></tr></table>
26871 bar<span>boo</span></p>
26887 bar<span>boo</span>
26891 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26894 "modes": ["selser"],
26895 "scrubWikitext": true,
26897 [ "p", "html", " a\n b" ]
26908 1. New links that end in spaces
26911 "modes": ["html2wt"],
26912 "scrubWikitext": false
26915 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26916 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26917 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26919 [[Berlin ]]<nowiki/>is the capital of Germany.
26923 [[Boston ]] is a city.
26927 2. New links that end in spaces
26930 "modes": ["html2wt"],
26931 "scrubWikitext": true
26934 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26935 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26936 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26938 [[Berlin]] is the capital of Germany.
26942 [[Boston]] is a city.
26946 1. Table cells with escapable prefixes
26949 "modes": ["html2wt"],
26950 "scrubWikitext": false
26954 <tr><td>a</td></tr>
26955 <tr><td>-</td></tr>
26956 <tr><td>+</td></tr>
26962 |<nowiki>-</nowiki>
26964 |<nowiki>+</nowiki>
26969 2. Table cells with escapable prefixes
26972 "modes": ["html2wt"],
26973 "scrubWikitext": true
26977 <tr><td>a</td></tr>
26978 <tr><td>-</td></tr>
26979 <tr><td>+</td></tr>
26992 3a. Table cells with escapable prefixes after edits
26995 "modes": ["selser"],
26996 "scrubWikitext": true,
26998 [ "table tbody tr:first-child td:first-child", "remove"]
27012 3b. Table cells with escapable prefixes after edits
27015 "modes": ["selser"],
27016 "scrubWikitext": true,
27018 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27025 |<span id="x">foo</span>+
27034 # FIXME: This test will fail because
27035 # normalization doesn't realize that the id attribute
27036 # will eliminate the escapable scenario
27038 4a. Table cells without escapable prefixes after edits
27041 "modes": ["selser"],
27042 "scrubWikitext": true,
27044 [ "#x", "html", "-" ]
27057 ## This tests normalizer's ability to discriminate between
27058 ## cells having identical content.
27060 4b. Table cells without escapable prefixes after edits
27063 "modes": ["selser"],
27064 "scrubWikitext": true,
27066 [ "td", "html", "-" ]
27079 ## This tests normalizer's ability to not be tripped by
27080 ## comments (and whitespace)
27082 4c. Table cells without escapable prefixes after edits
27085 "modes": ["selser"],
27086 "scrubWikitext": true,
27088 [ "table tbody tr td:first-child", "remove" ]
27103 ## This tests normalizer's ability to handle HTML cells
27105 4d. Table cells without escapable prefixes after edits
27108 "modes": ["selser"],
27109 "scrubWikitext": true,
27111 [ "td", "html", "-" ]
27116 <tr><td>a</td></tr>
27120 <tr><td>-</td></tr>
27124 ## T111151 Remove font elements without attributes
27126 5a. font tags without attributes should be dropped in scrubWikitext mode
27129 "modes": ["html2wt"],
27130 "scrubWikitext": true
27134 <font><font>bar</font></font>
27135 <font class="x">boo</font>
27139 <font class="x">boo</font>
27143 5b. font tags should not be dropped without scrubWikitext being enabled
27146 "modes": ["html2wt"],
27147 "scrubWikitext": false
27156 Escape nowiki DOM elements
27160 <nowiki><i>foo</i></nowiki>
27162 <nowiki>''foo''</nowiki>
27165 # This is meant to be an interim fix while we go about figuring out
27166 # how to not introduce these trailing <nowiki/>s in the first place.
27168 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27172 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27174 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
27175 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
27188 # ---------------------------------------------------
27189 # End of tests spec'ing wikitext serialization norms |
27190 # ---------------------------------------------------
27194 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27202 <td><b>c</b><p>d</p></td>
27220 # -----------------------------------------------------------------
27221 # End of section for Parsoid-only html2wt tests for serialization
27223 # -----------------------------------------------------------------
27225 # -----------------------------------------------------------------
27226 # The following section of tests are primarily to spec behavior of
27227 # the selective serializer. All these tests have manual selser
27228 # changes. The automated selser changes for all tests handle the
27229 # wide variation of changes, but these tests here capture specs
27230 # deterministically.
27231 # ----------------------------------------------------------------
27235 Selser: New comments should not be lost
27238 "modes": ["selser"],
27240 [ "#a", "after", "<!--c1-->" ],
27241 [ "#b", "before", "<!--c2-->" ]
27245 <span id="a">a</span>
27247 <span id="b">b</span>
27249 <span id="a">a</span><!--c1-->
27251 <!--c2--><span id="b">b</span>
27256 Selser: Check for validity of DSR before using it
27259 "modes": ["selser"],
27261 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27265 <span id="a">a</span>
27267 {{DISPLAYTITLE:foo}}
27268 <span id="a">a</span>
27272 1. DOMDiff: Changes to <ref> content should be looked up using id
27275 "modes": ["selser"],
27277 ["#X", "after", "bar"],
27278 ["#Y", "after", "baz"]
27282 X <ref><span id="X">foo</span></ref>
27285 <ref name="a"><span id="Y">foo</span></ref>
27288 X <ref><span id="X">foo</span>bar</ref>
27291 <ref name="a"><span id="Y">foo</span>baz</ref>
27296 2. DOMDiff: Changes to <ref> content should be looked up using id
27299 "modes": ["selser"],
27301 ["#Z", "after", "bar"]
27305 A <ref>foo bar for a</ref>
27306 B <ref group="X" name="b" />
27310 <references group="X">
27311 <ref name="b"><span id="Z">foo</span></ref>
27314 A <ref>foo bar for a</ref>
27315 B <ref group="X" name="b" />
27319 <references group="X">
27320 <ref name="b"><span id="Z">foo</span>bar</ref>
27325 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27328 "modes": ["selser"],
27330 [ "div:first-child", "text", "bar" ]
27334 <div style="{{1x|color:red;}}%">foo</div>
27336 <div style="{{1x|color:red;}}%">bar</div>
27349 <li class="mw-empty-elt"></li>
27350 <li class="mw-empty-elt"></li>
27358 [[File:Thumb.png|thumb]]
27360 <div class="thumb tright">
27361 <div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a>
27362 <div class="thumbcaption">
27363 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27370 unclosed internal link XSS (T137264)
27372 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27374 <p>[[#<script>alert(1)</script>|
27377 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>